Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to find the correlation between categorical and numerical columns

I'm trying to find the correlation between categorical and numerical columns in my dataset using Python, can anyone help?
Here is the data that I have. Thank you in advance.

Light_Sensor_Reading Light_Sensor_Status
231 Dim
231 Dim
231 Dim
231 Dim
231 Dim
231 Dim
231 Dim
231 Dim
231 Dim
232 Dim
950 Very_bright
988 Very_bright
987 Very_bright
986 Very_bright
986 Very_bright
986 Very_bright
986 Very_bright
986 Very_bright
986 Very_bright
986 Very_bright
986 Very_bright
986 Very_bright
986 Very_bright
985 Very_bright
985 Very_bright
like image 384
Alhanoof Avatar asked Oct 22 '25 23:10

Alhanoof


1 Answers

I would check this by plotting the data. The colors have to be somewhat horizontally

import seaborn as sns
sns.scatterplot(data=df, x=df.index, y='Light_Sensor_Reading', hue='Light_Sensor_Status')

Result of plot

like image 59
RaJa Avatar answered Oct 24 '25 13:10

RaJa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!