alteryx / alteryx/woodwork

Woodwork should not strip timezone information from datetime values upon initialization.

オープン
#1,477 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
155
フォーク
24
PR マージ指標
30日以内にマージされた PR はありません

説明

Currently if users have a datetime column in which the input values are timezone aware, the timezone information is removed from the datetime objects after Woodwork initialization. This information should be maintained since downstream process may need to make use of the timezone component of the datetime.

*Current Behavior*
```python
>>> import pandas as pd
>>> import woodwork as ww
>>> df = pd.DataFrame({
... "id": [0, 1, 2],
... "dates": pd.to_datetime(["2020-01-01", "2020-01-02", "2020-01-03"])
... })
>>> df["dates"] = df['dates'].dt.tz_localize("US/Eastern")
>>> df["dates"][0].tz

>>> df.ww.init(logical_types={"dates": "Datetime"})
>>> df["dates"][0].tz is None
True
```

The desired behavior is to have the timezone retained as `` after Woodwork initialization instead of being set to `None`

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。