Where method on DataFrames can't seem to take series as conditions #9558
Labels
Error Reporting
Incorrect or improved errors from pandas
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
I want to use
where
to set values across a DataFrame where a Series meets a condition.For example:
But this
returns an unedited DataFrame.
Whereas this returns just the middle row, as you'd expect:
Supplying
axis=0
oraxis=1
doesn't help. Am I doing something wrong? Or this unintended behavior?The text was updated successfully, but these errors were encountered: