I have the following dataframe:
print(inventory_df)
dt_op Prod_1 Prod_2 ... Prod_n
10/09/18 0 8 0
10/09/18 5 0 2
11/09/18 4 0 0
11/09/18 0 10 0
...
And I would like to get:
print(final_df)
dt_op Prod_1 Prod_2 ... Prod_n
10/09/18 5 8 2
11/09/18 4 10 0
...
I tried with:
final_df = inventory_df.drop_duplicates(subset=None, keep='first', inplace=False)
But it does not produce the desired output. How can I create final_df?