We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import pandas as pd import datetime as dt import pytz as tz data = pd.DataFrame([{'localized_date': dt.datetime(2018, 1, 12, 8, 15, tzinfo=tz.timezone('Europe/Berlin'))}]) data """ localized_date 0 2018-01-12 08:22:00+01:00 """ data.dtypes """ localized_date datetime64[ns, Europe/Berlin] dtype: object """ data.update(data) data """ localized_date 0 2018-01-12 07:22:00 """ data.dtypes """ localized_date datetime64[ns] dtype: object """
Update() method drops timezone info for datetime columns and cast all values to utc without a warning.
pd.show_versions()
pandas: 0.24.2 pytest: None pip: 9.0.1 setuptools: 39.0.1 Cython: None numpy: 1.16.2 scipy: None pyarrow: None xarray: None IPython: None sphinx: None patsy: None dateutil: 2.8.0 pytz: 2018.9 blosc: None bottleneck: None tables: None numexpr: None feather: None matplotlib: None openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml.etree: None bs4: None html5lib: 0.999999999 sqlalchemy: None pymysql: None psycopg2: None jinja2: None s3fs: None fastparquet: None pandas_gbq: None pandas_datareader: None gcsfs: None
The text was updated successfully, but these errors were encountered:
pls search for a duplicate issue
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Code Sample
Problem description
Update() method drops timezone info for datetime columns and cast all values to utc without a warning.
Output of
pd.show_versions()
pandas: 0.24.2
pytest: None
pip: 9.0.1
setuptools: 39.0.1
Cython: None
numpy: 1.16.2
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.8.0
pytz: 2018.9
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: 0.999999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
The text was updated successfully, but these errors were encountered: