correlation between two variables(categorical and continuous) in python
So you basically wanna calculate (ratio_for_location) = (number_of_defects_for_location) / (total_number_of_whatever_for_location) and check for outliers / find the function defect_ratio(location)?
I am struggling on a simple problem where i need to check whether customer location has effect on number of defects.
Dataset is like. Location has 50 values and categorical in nature and defects is continuous.

location  defects
a            20
b            30
c            40
d            50
e            60
f            70
g            80