I have a Population column with numbers and a Region column with locations. Im only using pandas. How would I go about finding the total population of a specific location (wellington) within the Region column?
Place = [data[‘Region’] == ‘Wellington’]
Place[data[‘Population’]]
an error came up
TypeError Traceback (most recent call last) Input In [70], in <cell line: 4>() 1 #Q1.e 3 Place = [data['Region']=='Wellington'] ----> 4 Place[data['Population']]
TypeError: list indices must be integers or slices, not Series
