Description
Code Sample
import pandas as pd
x = pd.Timestamp('2018-07-20 18:15:00+0200')
y = pd.DataFrame([{'date': x}])
y['date'].dt.date[0]
Problem description
In Pandas 0.23.0, this returns 2018-07-19
while in 0.22.0 it returns 2018-07-20
. The behaviour in 0.22.0 is the expected one. I tested this in two virtual environments on the same machine. The version output of both environments is attached below.
Output of pd.show_versions()
for Virtual Env. with Pandas 0.23.0
pandas: 0.23.0
pytest: None
pip: 9.0.1
setuptools: 28.8.0
Cython: None
numpy: 1.14.5
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.7.3
pytz: 2018.4
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
Output of pd.show_versions()
for Virtual Env. with Pandas 0.22.0
pandas: 0.22.0
pytest: None
pip: 9.0.1
setuptools: 28.8.0
Cython: None
numpy: 1.14.5
scipy: None
pyarrow: None
xarray: None
IPython: None
sphinx: None
patsy: None
dateutil: 2.7.3
pytz: 2018.4
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None