I am trying to filter on certain values in many columns in Column (Dimension) filter on Education, then in next column (indicator name), filter on Mean years of schooling (years), then in Country Name Column filter on USA, Canada,.....etc
I have tried the below script but I couldn't filter on the specifics mentioned above
raw_data={}
for Dimension in new_df["Dimension"]:
dimension_df=new_df.loc[new_df["Dimension"]==Dimension]
arr=[]
arr.append(dimension_df["Indicator Name"].values[0])
arr.append(dimension_df["ISO Country Code"].values[0])
raw_data[Dimension]=arr
pd.DataFrame(raw_data)