You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
result = Timestamp(unit * rounder(value /float(unit)), unit='ns')
A small, complete example of the issue
In [1] importpandasaspdIn [2]: ts=pd.Timestamp('2016-03-06 18:43:45.950000')
In [3]: ts.floor('10L')
Out [3]: Timestamp('2016-03-06 18:43:45.950000128')
@jreback I see, thank you for the clarification.
I just wanted to make clear that this is a similar issue but at a different location in the code due to duplication of internal rounding logic. I wouldn't be surprised if the same error is found in more locations.
FYI: The current affected classes (so far) are Timestamp, Timedelta and DatetimeIndex
This is the same problem as described in #14440 but with Timestamp, and the fix should be similar.
Probable source of error:
pandas/pandas/tslib.pyx
Line 438 in 093aa82
A small, complete example of the issue
Expected Output
Timestamp('2016-03-06 18:43:45.950000')
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: 093aa82
python: 2.7.6.final.0
python-bits: 64
OS: Linux
OS-release: 3.16.0-46-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
pandas: 0.19.0+63.g093aa82
nose: 1.3.7
pip: 9.0.0
setuptools: 28.7.1
Cython: 0.25.1
numpy: 1.11.2
scipy: None
statsmodels: None
xarray: None
IPython: 5.1.0
sphinx: None
patsy: None
dateutil: 2.5.3
pytz: 2016.7
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: None
boto: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: