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
import pandas as pd
df = pd.DataFrame(dict(A=np.array(range(0, 200)),
B=pd.Categorical(['a']*200, categories=['a', 'b'])))
# Setting a categorical with boolean indexing works fine for small indices
print df.loc[df.A == 5]
df.loc[df.A == 5, 'B'] = 'b'
print df.loc[df.A == 5]
print ""
# ... but fails for large indices
print df.loc[df.A == 150]
df.loc[df.A == 150, 'B'] = 'b'
print df.loc[df.A == 150]
outputs at my pandas 0.15.1.dev installation (note that the value is correctly updated for A==5, but not for A==150):
A B
5 5 a
A B
5 5 b
A B
150 150 a
A B
150 150 a
The text was updated successfully, but these errors were encountered:
Consider
outputs at my pandas 0.15.1.dev installation (note that the value is correctly updated for A==5, but not for A==150):
The text was updated successfully, but these errors were encountered: