Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: .dt.isocalendar().year #36032

Closed
vukhanh1202 opened this issue Sep 1, 2020 · 0 comments · Fixed by #36050
Closed

BUG: .dt.isocalendar().year #36032

vukhanh1202 opened this issue Sep 1, 2020 · 0 comments · Fixed by #36050
Labels
Bug Datetime Datetime data dtype
Milestone

Comments

@vukhanh1202
Copy link

vukhanh1202 commented Sep 1, 2020

Code Sample, a copy-pastable example

import pandas as pd

df = pd.DataFrame(
    {
        "Date": [
            pd.to_datetime("2016-01-01"),
            pd.to_datetime("2016-01-04"),
            pd.to_datetime("2016-01-05"),
            pd.to_datetime("2016-01-06"),
            pd.to_datetime("2016-01-07"),
            pd.to_datetime("2016-01-08"),
        ]
    }
)
df["Date"].dt.isocalendar().year

Problem description

new function .dt.isocalendar().year returns wrong value for the day of pd.to_datetime('2016-01-08'). It is supposed to return 2016 but 2017

please check on that

@vukhanh1202 vukhanh1202 added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 1, 2020
@mroeschke mroeschke added Datetime Datetime data dtype and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 1, 2020
asishm added a commit to asishm/pandas that referenced this issue Sep 1, 2020
@jreback jreback modified the milestones: 1.2, 1.1.2 Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants