Skip to content

Tag: database

dedup records(window function pandas)

Hi I am looking to dedup my records ordered by cancel date so I will only be interested in the most recent record. sample data id cancel_date type_of_fruit 1 2021-03-02 apple 1 2021-01-01 apple 2 2021-02-01 orange expected output id cancel_date type_of_fruit 1 2021-03-02 apple 2 2021-02-01 orange I wrote the …

I need help formating this data

I have data like this The problem is some data is not in the format like this As you can see in the “local,hometown” there are 3 commas, I want to delete one of them so the data become like this This is just an example to the problem in my data there could be more than 3 commas and

How do I get multiple rows from django database?

Hello I am trying to create an employee attendance program and I want to make it so that the employees can see the total hours they worked. This is the code that creating the problem: The error I get is and if I use it shows an error that says Answer You must use filter and iterate over results as