I am exploring some data using pandas (I imported the dataset from excel using read_excel).
One of my columns is a datetime... How can I select the 'max' and 'min' for this datetime column?
This is the same question as here:
Getting min and max Dates from a pandas dataframe
But, it wasn't answered there... My datetime column is not my index (I just have the default index 0,1,2,3...)
I have tried using max(df['creation_date'])
but I dont think its recognizing a date, I get
'31-10-2020 22:33:10'
(In the dataset I have datetime from 2021 too...)
How can I select the max and min date? do I have to make my date to be my index in order to achieve it?
(I come from a sql background... When I do df.info() the Dtype is object for the datetime, can I change the data type of the column of a dataframe to datetime?)