-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: assignment in Float64Index #7586
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
@jreback In my particular case the index results from timestamps differences which I needed to convert to |
this a small bug become of the implementation change in Pls give a full example. Its not clear what you are trying to do. |
I apologise, I thought the context was clear from the stackoverflow post. The following works great in pandas 0.13.1 but not in 0.14.0 : In [1]: import numpy as np
In [2]: import pandas as pd
# say you have some big DataFrame
In [3]: A = pd.DataFrame(np.random.rand(10,4), index=np.random.randn(10))
# and some others that contain a subset of the labels (here only one is created)
In [4]: B = A[A.index>0].copy()
In [5]: B[:] = np.random.rand(*B.shape)
# now A accumulates the B's:
In [6]: A.loc[B.index] = A.loc[B.index].add(B, fill_value=0) This case is not so unusual. Please let me know in case this is still unclear. |
Here's a workaround until 0.14.1. This is a bug.
|
Another case for |
@eldad-a if you want to give a try that would be great! Thanks for the report |
@cpcloud
You are most welcome! |
http://stackoverflow.com/questions/24446500/pandas-valueerror-when-assigning-dataframe-entries-using-index-due-to-a-change
The text was updated successfully, but these errors were encountered: