-
-
Notifications
You must be signed in to change notification settings - Fork 19.1k
Closed
Labels
Description
The option date_dayfirst
doesn't function as expected.
In [24]: df=pd.DataFrame(np.random.randn(5,5), index=pd.date_range('1/15/2000',periods=5, freq='D'))
In [25]: pd.set_option('date_dayfirst', True)
In [26]: df
Out[26]:
0 1 2 3 4
2000-01-15 0.487978 -0.224156 0.784338 0.473189 -0.661636
2000-01-16 1.090355 -1.211436 1.123339 -1.145785 -1.856864
2000-01-17 1.305624 -0.628171 -0.901822 -1.652694 0.290757
2000-01-18 -0.370491 -0.138887 0.393568 -1.489696 0.288056
2000-01-19 -0.169596 -0.585463 1.221087 0.226034 -0.677756
In [27]: pd.set_option('date_dayfirst', False)
In [28]: df
Out[28]:
0 1 2 3 4
2000-01-15 0.487978 -0.224156 0.784338 0.473189 -0.661636
2000-01-16 1.090355 -1.211436 1.123339 -1.145785 -1.856864
2000-01-17 1.305624 -0.628171 -0.901822 -1.652694 0.290757
2000-01-18 -0.370491 -0.138887 0.393568 -1.489696 0.288056
2000-01-19 -0.169596 -0.585463 1.221087 0.226034 -0.677756