Using & operator, don't forget to wrap the sub-statements with ():
&
()
males = df[(df[Gender]=='Male') & (df[Year]==2014)]
from : https://stackoverflow.com/questions/22086116/how-do-you-filter-pandas-dataframes-by-multiple-columns
No comments:
Post a Comment