Where method on DataFrames can't seem to take series as conditions · Issue #9558 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
I want to use where
to set values across a DataFrame where a Series meets a condition.
For example:
df=pd.DataFrame({'a':[1,2,3], 'b':[4,5,6]})
But this
returns an unedited DataFrame.
Whereas this returns just the middle row, as you'd expect:
Supplying axis=0
or axis=1
doesn't help. Am I doing something wrong? Or this unintended behavior?
Versions
python: 2.7.6.final.0
pandas: 0.14.1