Correlation between two non-numeric columns in a Pandas DataFrame
To quickly get a correlation:
df.apply(lambda x: x.factorize()[0]).corr()
group phone_brand
group 1.000000 0.427941
phone_brand 0.427941 1.000000
Heat map
import seaborn as sns
sns.heatmap(pd.crosstab(df.group, df.phone_brand))