Guided Project - Exit Survey - No numeric types to aggregate Error

My Code:

dis_pct = combined_updated.pivot_table(index='service_cat', values='dissatisfied')

<!--Enter other details below: -->

I am doing Project Exit Survey step 10/11 but I got the error when writing the above code.

Please help.


Can you please provide a link to the guided project so that others can experiment with your code?

Based on what you’ve provided, it seems that the problem is coming from the fact that df.pivot_table() defaults to using np.mean() for its aggregation function and the values in dissatisfied are not numerical.