i have pandas dataframe
aa={'month':[1,2,3,4,5,6,7,8,9,10,11,12]*3,'year':[2018]*12+[2019]*12+[2020]*12}
df = pd.DataFrame(aa,columns = ['month','year'])
I want to filter only month 10 and year 2020 and 2019 how can it be done.
i am trying this but gives dataframe with zero rows.
ncdf = df.loc[(df['year'] == 2020+'|'+2019)&(df['month'] == 10)]