pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
42.57k stars 17.56k forks source link

BUG: rounding datetime in series is broken #59131

Closed Andre-Medina closed 2 days ago

Andre-Medina commented 3 days ago

Pandas version checks

Reproducible Example

pd.Series([pd.to_datetime("2022-01-09T12:00:01")]).round("30min") == pd.Series([pd.to_datetime("2022-01-09T12:00:01").round("30min")])

Issue Description

Repeat of issue of #57002

Expected Behavior

example should return true

Installed Versions

INSTALLED VERSIONS ------------------ commit : d9cdd2ee5a58015ef6f4d15c7226110c9aab8140 python : 3.10.13.final.0 python-bits : 64 OS : Linux OS-release : 5.15.153.1-microsoft-standard-WSL2 Version : #1 SMP Fri Mar 29 23:14:13 UTC 2024 machine : x86_64 processor : byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8 pandas : 2.2.2 numpy : 1.26.4 pytz : 2024.1 dateutil : 2.9.0 setuptools : 69.1.0 pip : 24.0 Cython : None pytest : 8.1.1 hypothesis : None sphinx : None blosc : None feather : None
MarcoGorelli commented 2 days ago

dupe of https://github.com/pandas-dev/pandas/issues/57002, please don't repost