Closed
Description
pandas: 0.17.0
python: 3.5.0.final.0
import pandas as pd
list1 = {"Date":["01/11/15"]} #1st November 2015
pd.set_option('display.date_dayfirst', True)
#pd.set_option('display.date_yearfirst', False)
df = pd.DataFrame(list1, columns=['Date'])
df['Date'] = pd.to_datetime(df['Date'], dayfirst = [True])
df1 = df.sort_values(['Date'], ascending=[True])
print(df1)
Prints:
Date
0 2015-11-01
Setting both options to True
and False
doesn't work nor does only setting one. Printing df and df1 have the same result. And not specifying a dayfirst
argument in pd.to_datetime
doesn't change anything.