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
Whenever a boolean array is used to assign some list or array to another series, it returns "ValueError: Length of replacements must equal series length". This was working fine in pandas 10.0, but broke with 10.1
importpandasaspdimportnumpyasnpx=pd.Series(np.arange(10))
sel=x<5len(x[sel])
x[sel] =range(5) # doesn't work anymorex[0:5] =range(5) # works
The text was updated successfully, but these errors were encountered:
@Tarlitz also...I would recommend you put the rhs side as a Series in any event (and map the indicies to your values), or a full length ndarray, which reduces the chance that your boolean mask is not 'lined up' with the rhs, just my 2c
Whenever a boolean array is used to assign some list or array to another series, it returns "ValueError: Length of replacements must equal series length". This was working fine in pandas 10.0, but broke with 10.1
The text was updated successfully, but these errors were encountered: