I ve searched the forum but could find anything.
My code is as follow:
def my_function(df):
plt.figure()
heatmap=sns.heatmap(df,cmap='coolwarm',)
plt.title('title')
plt.show()
return heatmap
I woud like to retrieve the data from heatmap. I have seen how to do with matplotlib but i couldnt figure out how to do with sns/seaborn heatmap
Edit: the heatmap variable type is <class 'matplotlib.axes._subplots.AxesSubplot'>
Edit2: I know i can retrieve the data in dataframe but i want to unit test my function, that's why i try to retrieve the data in seaborn heatmap