## Compute co-occurences in pandas dataframe for column values grouped by another column values

Question I am using Pandas on Python 3.7.7. I would like to compute the mutual information between categorical values of a variable x grouped by another variable’s values y. My data looks like the …