describe() does not report first and last on tz-aware datetime Series · Issue #21328 · pandas-dev/pandas (original) (raw)

Code Sample, a copy-pastable example if possible

s = pd.Series(pd.date_range("2018-01-01","2018-01-05")) s.describe() # includes first and last s.dt.tz_localize('US/Eastern').describe() # does not include first and last

Problem description

The describe method on a timezone-naive datetime Series reports the "first" (min) and "last" (max) values. I would expect the same to be true for a timezone-aware datetime Series, since min and max are defined there as well.

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None
python: 3.6.4.final.0
python-bits: 64
OS: Linux
OS-release: 4.13.0-43-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.23.0
pytest: 3.4.2
pip: 9.0.1
setuptools: 38.4.0
Cython: None
numpy: 1.14.3
scipy: 1.1.0
pyarrow: 0.9.0
xarray: None
IPython: 6.2.1
sphinx: 1.7.3
patsy: 0.5.0
dateutil: 2.7.3
pytz: 2018.4
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: 0.4.0
matplotlib: 2.1.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 1.0.1
sqlalchemy: 1.2.7
pymysql: None
psycopg2: 2.7.4 (dt dec pq3 ext lo64)
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None