-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: pd.date_range
not factoring in nanoseconds
in freq
#46877
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
Comments
Issue seems to occur when offsetting the date. If only the time is offset, issue does not occur. |
thanks @galipremsagar for the report.
This was fixed in commit: [cd5a124] FIX BUG: Timestamp add/sub DateOffset with nanoseconds lost. (#43968)
not sure why but this appears to be dropping into the The tests added in #43968, only included one component per test. cc @tushushu |
take |
So, I am getting this: "/pandas/core/arrays/datetimes.py:398: UserWarning: Discarding nonzero nanoseconds in conversion. and I need help regarding what is happening to proceed. |
This happened as the change in the file mentioned below, as this code based on these results: in this file : /pandas/_libs/tslibs/offsets.pyx |
…#53681) * BUG: Fixed inconsistent multiplication pandas-dev#47953 * Fixed release note * Fixed attribute name * Changed offset apply logic * Addressed pandas-dev#46877 re-occurence * Removed dulicate code * Addressed comments * Added unit test cases * Added mistakenly removed 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
While generating date ranges,
nanoseconds
specified infreq
are not being factored in.Expected Behavior
Installed Versions
INSTALLED VERSIONS
commit : 945c9ed
python : 3.9.6.final.0
python-bits : 64
OS : Darwin
OS-release : 21.4.0
Version : Darwin Kernel Version 21.4.0: Fri Mar 18 00:45:05 PDT 2022; root:xnu-8020.101.4~15/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : None
LOCALE : en_US.UTF-8
pandas : 1.3.4
numpy : 1.22.3
pytz : 2022.1
dateutil : 2.8.2
pip : 22.0.4
setuptools : 59.8.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 : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : 3.0.9
pandas_gbq : None
pyarrow : 5.0.0
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: