-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: resample apply is actually aggregate #38463
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
Thanks @endremborza for the report. master gives the expected output
|
well, I don't understand how that's possible, as this is the same in master:
anyway, my bad for not checking. this seems to handle something similar: |
However, as far as I can tell, the solution I linked in the commit does not solve this:
as this would give TypeError, not Data, Key or Attribute, which are handled. |
hmm, I have bottleneck installed in my dev environment. in a clean environment with 1.2.0rc0 gives the result in the op, installing bottleneck and gives expected output. |
As of pandas version 1.3.2 We already have Please, either fix To see the problem for yourself with any version of Python:
Both functions are bound to the same object. |
hence the open status of this issue
pandas, like many open source projects, is nearly all volunteer since there are 3000+ open issue most patches must come from the community you are welcome to submit a Pull Request and the core team will review. |
this alias exists for compatibility with grouping which uses the same convention - not even sure why this is a problem this is unlikely to change |
what do you mean grouping has the same convention? they are in no way aliases |
I think we should be working to differentiate the behavior between Should we expose a |
I would be OK with this in the hope for |
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
this piece of code does it, I don't really understand why these things are OK to be the same function here
pandas/pandas/core/resample.py
Line 308 in 7ffbf1a
Code Sample, a copy-pastable example
Problem description
current behavior calls the function on all columns, in all groups, as in aggregate, but is should on all dfs of the groups as in apply
Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : 2a7d332
python : 3.8.5.final.0
python-bits : 64
OS : Linux
OS-release : 5.2.1-1.el7.elrepo.x86_64
Version : #1 SMP Sun Jul 14 08:15:04 EDT 2019
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.1.2
numpy : 1.19.1
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 47.1.0
Cython : None
pytest : 4.6.11
hypothesis : 5.29.0
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : 2.8.5 (dt dec pq3 ext lo64)
jinja2 : 2.11.2
IPython : 7.17.0
pandas_datareader: None
bs4 : None
bottleneck : 1.3.2
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.3.1
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.5
pandas_gbq : None
pyarrow : None
pytables : None
pyxlsb : None
s3fs : None
scipy : 1.5.2
sqlalchemy : 1.3.19
tables : 3.6.1
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: