공부
[python] pandas loc - filter for list of values
승가비
2022. 8. 18. 00:42
728x90
df.loc[df['channel'].isin(['sale','fullprice'])]
https://stackoverflow.com/questions/45803676/python-pandas-loc-filter-for-list-of-values
python pandas loc - filter for list of values
This should be incredibly easy, but I can't get it to work. I want to filter my dataset on two or more values. #this works, when I filter for one value df.loc[df['channel'] == 'sale'] #if I h...
stackoverflow.com
728x90