Description
-
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
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
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