1# credit to Stack Overflow user in the source link
2
3import pandas as pd
4import seaborn as sns
5import matplotlib.pyplot as plt
6
7A = [...] # insert here your list of values for A
8B = [...] # insert here your list of values for B
9
10df = pd.DataFrame({'A': A, 'B': B})
11corr = df.corr(method = 'spearman')
12sns.heatmap(corr, annot = True)
13plt.show()