Question:
I have a dataframe ‘trades_df’. It has columns, ‘open_time’ and ‘close_time’ in the format 19-08-2020 12:19. I want to make a new column ‘time_spent’ which would be the difference between ‘close_time’ and ‘open_time’. See the photo for reference.
Answer:
Your datetimes have days come first, sodayfirst
should be True:If you have better answer, please add a comment about this, thank you!