You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a DatetimeColumn is converted to StringColumn, we seem to be converting the entire sub-second & H:M:S data without checking if there is any data for those units. Pandas doesn't generate the data if these values are 0's. We should be matching the behavior atleast in pandas-compatibility mode, because this can only be achieved with some amount of overhead.
Steps/Code to reproduce bug
In [34]: importpandasaspdIn [35]: s=pd.Series(['2000-01-01 00:00:00.000000000'], dtype='datetime64[ns]')
In [36]: sOut[36]:
02000-01-01dtype: datetime64[ns]
In [37]: s.astype("str")
Out[37]:
02000-01-01dtype: objectIn [38]: gs=cudf.from_pandas(s)
In [39]: gsOut[39]:
02000-01-01dtype: datetime64[ns]
In [40]: gs.astype('str')
Out[40]:
02000-01-0100:00:00.000000000dtype: object
Expected behavior
In [37]: gs.astype("str")
Out[37]:
02000-01-01dtype: object
Environment overview (please complete the following information)
Environment location: [Bare-metal]
Method of cuDF install: [from source]
The text was updated successfully, but these errors were encountered:
galipremsagar
changed the title
[BUG] Datetime to string conversion doesn't match pandas
[BUG] Datetime to string conversions doesn't match pandas
Sep 21, 2023
galipremsagar
changed the title
[BUG] Datetime to string conversions doesn't match pandas
[BUG] Datetime to string conversion shouldn't convert sub-second and hours, mins & seconds data if none exists
Sep 21, 2023
Describe the bug
When a
DatetimeColumn
is converted toStringColumn
, we seem to be converting the entire sub-second & H:M:S data without checking if there is any data for those units. Pandas doesn't generate the data if these values are 0's. We should be matching the behavior atleast in pandas-compatibility mode, because this can only be achieved with some amount of overhead.Steps/Code to reproduce bug
Expected behavior
Environment overview (please complete the following information)
The text was updated successfully, but these errors were encountered: