Screen Link:
My Code:
reside_mode = reside.groupby('CountryLive').apply(lambda x: x.mode([0]))
reside_mode['spent_monthly'][['Canada', 'India', 'United Kingdom', 'United States of America']]
What I expected to happen:
First mode to print.
What actually happened:
TypeError: unhashable type: 'list'
How would I pick the first mode returned in the mode series?
FindBestMarketstoAdvertise-Copy2.ipynb (118.5 KB)