I am trying to use a query (countries who received a gold medal) from the data frame and store into elsewhere. A portion of the dataset is shown below.

This is the query I have run
only_gold = df.where(df['Gold'] > 0)
only_gold.head()

I have also tried the query
only_gold = df[df['Gold'] > 0]
only_gold.head()
But the same error has been generated