You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's the shortest example I could find. Data gets somehow corrupted when creating new columns while iterating over the index. Pre-generating initial values for columns solved my problem (commented out part)
I am using pandas 0.9.0
df=pd.DataFrame(index=[0,1])
df[0] =nanwasCol= {}
# uncommenting these makes the results match#for col in xrange(100, 200):# wasCol[col] = 1# df[col] = nanfori, dtinenumerate(df.index):
forcolinxrange(100, 200):
ifnotcolinwasCol:
wasCol[col] =1df[col] =nandf[col][dt] =imyid=100print(len(df.ix[isnan(df[myid]), [myid]]))
print(len(df.ix[isnan(df[myid]), [myid]]))
Outputs:
0
1
The text was updated successfully, but these errors were encountered:
Well, I can verify this was fixed in 5d6e7c8-- the bug is still present in v0.9.1. I would suggest upgrading to 0.10.0 or the development version as soon as practical. I'll add a unit test for your example
That's the shortest example I could find. Data gets somehow corrupted when creating new columns while iterating over the index. Pre-generating initial values for columns solved my problem (commented out part)
I am using pandas 0.9.0
Outputs:
The text was updated successfully, but these errors were encountered: