Jak stworzyć mapę cieplną korelacji w Pythonie
# import modules
import matplotlib.pyplot as mp
import pandas as pd
import seaborn as sb
# import file with data
data = pd.read_csv("C:\\Users\\Vanshi\\Desktop\\bestsellers.csv")
# prints data that will be plotted
# columns shown here are selected by corr() since
# they are ideal for the plot
print(data.corr())
# plotting correlation heatmap
dataplot = sb.heatmap(data.corr(), cmap="YlGnBu", annot=True)
# displaying heatmap
mp.show()
Hurt Hedgehog