-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Last day of month should group with that month #17898
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
looks like a fencepost problem. if you'd like to debug would be great for M
for MS
|
Looking into It looks like here we do:
So in the
In the debugger, if I manually overwrite that dt index with
Will look into this more a little later. |
@heydenberk just retried my sample on master and the output is the same, so looks like it hasn't been fixed. |
Any updates on this? |
I haven't looked into this any further, but just retried the test case on 1.2.1 and the same issue persists. |
This is probably just me not understanding, but I don't see what's wrong with the current output For a smaller example, if we have
then do you think the output should be
? Because if you want the interval to be closed on the left, then it seems correct to me that In the given example, if we start with
and it seems correct to me that |
Code Sample, a copy-pastable example if possible
Problem description
I don't know whether this is a bug or whether I don't understand the expected behavior. I would expect the max index value in both cases to be "2017-08-31", but it looks like it's considering 08-31-2017 to be in September. If I have an observation on 2017-08-31 before midnight, it should still be grouped into the period ending 2017-08-31, right?
Expected Output
Output of
pd.show_versions()
I'm using pandas 0.20.3 here, but I also checked this on the latest commit and it looks like the behavior persists.
pandas: 0.20.3
pytest: None
pip: 9.0.1
setuptools: 36.4.0
Cython: None
numpy: 1.13.1
scipy: 0.19.1
xarray: None
IPython: 6.1.0
sphinx: None
patsy: 0.4.1
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.9999999
sqlalchemy: 1.1.13
pymysql: None
psycopg2: 2.7.1 (dt dec pq3 ext lo64)
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: