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] to_datetime does not correctly convert single digit months and hours to datetime #9082

Closed
esnvidia opened this issue Aug 20, 2021 · 0 comments · Fixed by #9173
Closed
Assignees
Labels
bug Something isn't working libcudf Affects libcudf (C++/CUDA) code.

Comments

@esnvidia
Copy link

esnvidia commented Aug 20, 2021

Non zero padded months and hours should be correctly parsed

image

but changing string to '2010-08-21 08:43' will parse correctly

Expected behavior
parse the non-zero padded months and hours (and possibly others) correctly

Here's a workaround example for month:

month = df.month.astype(str)
month.loc[month.str.len() == 1] = '0' + month.loc[month.str.len() == 1]

Rapids 21.06 - Docker install

Additional context
Used for parsing dates that are later sorted - so this issue is very important for temporal work.

@esnvidia esnvidia added Needs Triage Need team to review and classify bug Something isn't working labels Aug 20, 2021
@davidwendt davidwendt self-assigned this Aug 20, 2021
@beckernick beckernick added libcudf Affects libcudf (C++/CUDA) code. and removed Needs Triage Need team to review and classify labels Aug 23, 2021
@beckernick beckernick added this to the Time Series Analysis milestone Aug 23, 2021
rapids-bot bot pushed a commit that referenced this issue Sep 13, 2021
Closes #9082 

This PR adds support to the `cudf::to_timestamps` API to allow single digit day and month in the input strings format.

Corresponding updates are also made to `cudf::is_timestamps`.

Authors:
  - David Wendt (https://github.com/davidwendt)

Approvers:
  - Devavret Makkar (https://github.com/devavret)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #9173
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working libcudf Affects libcudf (C++/CUDA) code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants