We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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 master branch of pandas.
from pandas.tseries.offsets import DateOffset from pandas import Timedelta, Timestamp # With Timedelta this works as expected: Timestamp(0) + Timedelta(nanoseconds=1, microseconds=1) # >>> Timestamp('1970-01-01 00:00:00.000001001') Timestamp(0) + DateOffset(nanoseconds=1, microseconds=1) # >>> Timestamp('1970-01-01 00:00:00.000001') (Timestamp(0) + DateOffset(nanoseconds=1, microseconds=1)).nanosecond # >>> 0
The nanoseconds component DateOffset's does not appear to affect Timestamps when adding them.
Possibly related issue. #36589
I expect this to be the same behavior as pd.Timedelta as illustrated above.
commit : 73c6825 python : 3.9.7.final.0 python-bits : 64 OS : Linux OS-release : 5.10.46-4rodete4-amd64 Version : #1 SMP Debian 5.10.46-4rodete4 (2021-09-06) machine : x86_64 processor : byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8
pandas : 1.3.3 numpy : 1.21.1 pytz : 2021.1 dateutil : 2.8.2 pip : 20.3.4 setuptools : 57.4.0 Cython : 0.29.24 pytest : 6.2.5 hypothesis : 6.23.1 sphinx : 4.1.2 blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 3.0.1 IPython : None pandas_datareader: None bs4 : None bottleneck : None fsspec : None fastparquet : None gcsfs : None matplotlib : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pyxlsb : None s3fs : None scipy : None sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None numba : None
The text was updated successfully, but these errors were encountered:
Hi, may I work on this issue?
Sorry, something went wrong.
Working on in my forked repo, gonna put a PR later. https://github.com/tushushu/pandas/tree/fix-bug-dateoffset-nanoseconds
date_range
nanoseconds
DateOffset
pd.date_range
freq
tushushu
Successfully merging a pull request may close this issue.
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 master branch of pandas.
Reproducible Example
Issue Description
The nanoseconds component DateOffset's does not appear to affect Timestamps when adding them.
Possibly related issue. #36589
Expected Behavior
I expect this to be the same behavior as pd.Timedelta as illustrated above.
Installed Versions
INSTALLED VERSIONS
commit : 73c6825
python : 3.9.7.final.0
python-bits : 64
OS : Linux
OS-release : 5.10.46-4rodete4-amd64
Version : #1 SMP Debian 5.10.46-4rodete4 (2021-09-06)
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.3
numpy : 1.21.1
pytz : 2021.1
dateutil : 2.8.2
pip : 20.3.4
setuptools : 57.4.0
Cython : 0.29.24
pytest : 6.2.5
hypothesis : 6.23.1
sphinx : 4.1.2
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: