[Python] Correlation method to findout correlation

Discussão em 'Python' iniciado por Stack, Janeiro 22, 2025.

  1. Stack

    Stack Membro Participativo

    Apply an appropriate correlation method to find out the correlation between one numeric variable and one categorical variable with multiple categories. Show its implementation using an appropriate dataset.

    i am using Dimond.csv dataset image here -> 1

    mean = df.groupby('Cut')['Price'].mean()
    plt.figure(figsize=(8,6))
    plt.bar(mean.index, mean.values)
    plt.xlabel('Cut')
    plt.ylabel('Mean Price')
    plt.title('Correlation between Cut and Price')
    plt.show()


    is my code correct according to question?

    Continue reading...

Compartilhe esta Página