I’m trying to bring back all values that, in upper case, equal "EU". My solution below doesn’t work. Does anybody know how I would do this?
companies_df.loc[(upper(companies_df["location"]) == 'EU')].head(10)
>Solution :
The issue with your code is that the upper function is not applied correctly to the location column. In pandas, you can use the str accessor to apply string methods to a column.
companies_df.loc[companies_df["location"].str.upper() == 'EU'].head(10)