NVIDIA / NVIDIA/cudf

[BUG] `Series[datetime64[reso, tz]].astype(str)` doesn't not include %z component

Open
#21,373 0 comments 0 reactions 0 assignees View on GitHub
bug Python
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

**Describe the bug**
```python
In [1]: import pandas as pd, cudf

In [2]: import datetime

In [4]: data = [datetime.datetime(2020, 1, 1, tzinfo=datetime.timezone.utc)]

In [5]: pd.Series(data).astype(str)
Out[5]:
0 2020-01-01 00:00:00+00:00
dtype: object

In [6]: cudf.Series(data).astype(str)
Out[6]:
0 2020-01-01 00:00:00.000000
dtype: object
```

**Expected behavior**
`Out[6]` should match `Out[5]`. Also notable if that if the components seconds or less area all 0 than `%f` formatting should not be included

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.