You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
firstly do the filtering trick as below: dataframe[dataframe['this_column'] == 'that_value']
note that .loc method filters for the column labels in the dataframe. if you have a series it already contains one column
put closing square bracket in mean_price variable, as below: mean_price = brand_only.loc[['price']].mean()
note that nested square brackets are only used in case of multiple columns, when you only need one column, it is safe to put the column label with single pair of square brackets, i.e. .loc['price']
The text was updated successfully, but these errors were encountered: