📅  最后修改于: 2022-03-11 14:46:19.600000             🧑  作者: Mango
# credit to Stack Overflow user in the source link
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
A = [...] # insert here your list of values for A
B = [...] # insert here your list of values for B
df = pd.DataFrame({'A': A, 'B': B})
corr = df.corr(method = 'spearman')
sns.heatmap(corr, annot = True)
plt.show()