We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
asfreq
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
pd.DataFrame.asfreq seems to silently drop rows when the data is not sorted.
pd.DataFrame.asfreq
d=pd.DataFrame(range(3), index=pd.to_datetime(["2021-01-01", "2021-03-01", "2021-02-01"])).asfreq("MS") d # output: # 2021-01-01 0 # 2021-02-01 2
Silent data loss is very dangerous in data analysis as it's hard to detect.
Expected behavior:
INSTALLED VERSIONS ------------------ commit : 9d598a5e1eee26df95b3910e3f2934890d062caa python : 3.8.5.final.0 pandas : 1.2.1 numpy : 1.19.2
The text was updated successfully, but these errors were encountered:
The source of the issue seems to be on this line.
I'm willing to take on this issue. I just need to which behavior is preferred.
I would lean towards handling this implicitly. I don't see a need to raise an error or warning.
Sorry, something went wrong.
Thanks @Gerenuk for the excellent report - I don't know what the correct solution would be, but can confirm it reproduces
take
nmay231
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
pd.DataFrame.asfreq
seems to silently drop rows when the data is not sorted.Silent data loss is very dangerous in data analysis as it's hard to detect.
Expected behavior:
The text was updated successfully, but these errors were encountered: