📜  熊猫绘图热图 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:17.618000             🧑  作者: Mango

代码示例1
import matplotlib.pyplot as plt
import seaborn as sns

# optional: resize images from now on
plt.rcParams["figure.figsize"] = (16, 12)

# numeric_only_columns is a list of columns of the DataFrame
# containing numerical data only
# annot = True to visualize the correlation factor

sns.heatmap(df[numeric_only_columns].corr(), annot = False)
plt.show()