From my dataset, I have two columns called the cuisine and the restaurant-grade. Each column corresponds to a restaurant. There are 6 different cuisines and 5 different grades. The question that I am asked is to check whether there is a statistically significant relationship between those two.
What I did was to create a crosstable counting occurrence of all. As a result, I have the following table:
Then created an array called f_obs including all the values:
array([[4770, 132, 21, 130, 108], [1633, 27, 4, 58, 18], [1858, 90, 20, 51, 112], [ 778, 24, 3, 13, 20], [ 757, 32, 6, 31, 38], [ 957, 40, 8, 21, 32]], dtype=int64)
From this point on, I am not sure how I need to process or even on the right track. Can I check the statistically significance of a relationship of two categorical values with more than two classes? Do I need to use chi-square as if there are two classes? If you know, I would also appreciate it if you can provide the python function that can help me! (it should probably be scipy)