Skip to content

BUG: options date_dayfirst and date_yearfirst conflict #43164

Open
@attack68

Description

@attack68

Can someone confirm that this is a bug:

pd.options.display.chop_threshold = 0.5
pd.options.display.date_dayfirst = True
df = pd.DataFrame([[1.00, 0.1, 0.01, 0.001], [2.22, 2.22, 2.22, 2.22]], 
                  index=pd.date_range(start="01-01-2000", periods=2))
print(df)
               0     1     2     3
2000-01-01  1.00  0.00  0.00  0.00
2000-01-02  2.22  2.22  2.22  2.22

Also it seems weird to have the options display.date_dayfirst and display.date_yearfirst with both set to False by default, and yet print year first..

Docs say: When True, prints and parses dates with the day first, eg 20/01/2005. Maybe this is just for parsing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    DatetimeDatetime data dtypeDocsNeeds TestsUnit test(s) needed to prevent regressions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions