-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: exponential moving window covariance fails for a non-from_product MultiIndexed DataFrame #43082
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
I would like to work on this issue. |
I am also getting the same error in the case of MultiIndex.from_arrays as seen in the above snippet but unexpectedly I am getting a similar error for MultiIndex.from_product as could be seen in the below snippets. Output of pd.show_versions() INSTALLED VERSIONScommit : 7c48ff4 pandas : 1.2.5 My Understanding of the Issue:
Still working on the issue to resolve it internally if possible. |
Thanks for the report. I think this is a duplicate of #21157 (which is generally an issue when calling |
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.
Code Sample, a copy-pastable example
Problem description
cov
works fine when theMultiIndex
is created withfrom_product
, but fails here since theMultiIndex
here cannot be created in this way. I would expect the.cov
to work on any MultiIndex since the form of the column names should not impact covariance computations. It works forpd.DataFrame(df.values).ewm(alpha=0.1).cov()
. This issue is closely related to this older bug.Expected Output
A standard
ewm.cov
output.Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: