I have a dataset that has 10 columns including a region column, two string columns and the rest are numerical. I need to group all the float columns by region and compute the mean and median for these numerical attributes, while excluding the string columns.
I am unable to figure something out beyond this point. I though of somehow using the '~' operator but dont know how to do it.
import pandas as pd
import numpy as np
x = df.groupby('region')[...]
print (x.mean())
print (x.median())