-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: the seconds
attribute of .dt.components
for pyarrow timestamp datatype seem faulty
#57355
New issue
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
Closed
3 tasks done
Labels
Comments
Thanks for the report. Confirmed on main, further investigations and PRs to fix are welcome! |
Will try to work on this. |
take |
St0rmie
added a commit
to St0rmie/pandas
that referenced
this issue
Mar 27, 2024
…incorrect time values. (pandas-dev#57355)
St0rmie
added a commit
to St0rmie/pandas
that referenced
this issue
Mar 27, 2024
…incorrect time values. (pandas-dev#57355)
Merged
5 tasks
St0rmie
added a commit
to St0rmie/pandas
that referenced
this issue
May 3, 2024
…incorrect time values. (pandas-dev#57355)
St0rmie
added a commit
to St0rmie/pandas
that referenced
this issue
May 4, 2024
…incorrect time values. (pandas-dev#57355)
St0rmie
added a commit
to St0rmie/pandas
that referenced
this issue
Jun 15, 2024
…incorrect time values. (pandas-dev#57355)
St0rmie
added a commit
to St0rmie/pandas
that referenced
this issue
Jun 15, 2024
…incorrect time values. (pandas-dev#57355)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
These are the data:
I noticed that calling
.dt.components
on the above duration object behaves differently for the'timestamp[ns][pyarrow]'
vs. the'timedelta64[ns]'
data types. For the former, theseconds
attribute (column) give a very high value (and I assume it is total seconds for the 'HH:MM:SS' part.results in:
Expected Behavior
Converting to pandas 1.x
'timedelta64[ns]'
give an expected result:results in:
Installed Versions
INSTALLED VERSIONS
commit : f538741
python : 3.12.1.final.0
python-bits : 64
OS : Darwin
OS-release : 21.6.0
Version : Darwin Kernel Version 21.6.0: Sun Nov 6 23:31:13 PST 2022; root:xnu-8020.240.14~1/RELEASE_ARM64_T6000
machine : arm64
processor : arm
byteorder : little
LC_ALL : None
LANG : de_DE.UTF-8
LOCALE : de_DE.UTF-8
pandas : 2.2.0
numpy : 1.26.4
pytz : 2024.1
dateutil : 2.8.2
setuptools : 69.0.3
pip : 24.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : 8.21.0
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : None
bottleneck : None
dataframe-api-compat : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 15.0.0
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2023.4
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: