Timestamp ceil rounds up when it should not when using the '15min' frequency in 0.23.0
.
#21262
Labels
Bug
Datetime
Datetime data dtype
Regression
Functionality that used to work in a prior pandas version
Milestone
Code Sample
Problem description
When the frequency is 15min
.ceil()
rounds up when the timestamp is divisible by the frequency.From some experimentation, this also occurs with some other minute frequencies, notably:
2
,4
,15
,20
Minute frequencies that are factors of 60 should have consistent behavior in my opinion (not sure about the behavior of non-factors but those would be rare edge cases).
This appears to be a regression in the latest version of pandas
0.23.0
as it is working as expected in0.22.0
Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 3.5.1.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.0-124-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.23.0
pytest: 2.8.5
pip: 9.0.1
setuptools: 39.2.0
Cython: 0.23.4
numpy: 1.14.3
scipy: 0.17.1
pyarrow: None
xarray: None
IPython: 6.4.0
sphinx: 1.3.1
patsy: 0.4.1
dateutil: 2.7.3
pytz: 2018.4
blosc: None
bottleneck: 1.0.0
tables: 3.2.2
numexpr: 2.5.2
feather: None
matplotlib: 1.5.1
openpyxl: 2.3.2
xlrd: 0.9.4
xlwt: 1.0.0
xlsxwriter: 0.8.4
lxml: 3.6.0
bs4: 4.4.1
html5lib: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: 2.6.2 (dt dec pq3 ext lo64)
jinja2: 2.8
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: