BUG: DataFrame.min(axis=1)
raises FutureWarning
for timezone aware datetimes and returns wrong results
#51242
Closed
1 of 3 tasks
Labels
Bug
DataFrame
DataFrame data structure
Reduction Operations
sum, mean, min, max, etc.
Timezones
Timezone data dtype
Milestone
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
We would expect 2 NaTs in the following call, not just one
We would expect a single NaT, but we get a warning and a series of float NaNs
The simliar calls with
df
(no timezones) return expected results.Expected Behavior
see description
Installed Versions
INSTALLED VERSIONS
commit : 8dab54d
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.191-el7.lime.2.x86_64
Version : #1 SMP Thu Jul 14 19:09:52 EDT 2022
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.5.2
numpy : 1.21.3
pytz : 2022.1
dateutil : 2.8.2
setuptools : 65.2.0
pip : 22.1.2
Cython : None
pytest : 4.6.5
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.2
html5lib : None
pymysql : None
psycopg2 : 2.9.3
jinja2 : 3.0.3
IPython : 7.33.0
pandas_datareader: None
bs4 : None
bottleneck : None
brotli :
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : 3.3.4
numba : 0.50.1+3.g7f7b8af82
numexpr : None
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : 4.0.1
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.7.3
snappy : None
sqlalchemy : 1.4.9
tables : None
tabulate : 0.8.9
xarray : None
xlrd : 2.0.1
xlwt : 1.3.0
zstandard : None
tzdata : None
The text was updated successfully, but these errors were encountered: