I am iterating trough a directory with 500 csv files and I create a heatmap for each file, however this currently takes a lot of memory because Python/ Jupyter Notebook is displaying all the heatmaps.
Is there a way to just save the plots in the folder without displaying them ?
# The next line somehow always displays the plot, but is also necessary for the creation
sns.heatmap(pivot_table,linewidths=.8, cmap="YlGnBu")
# This saves the plot to the file I want it to :
Path( str(os.getcwd()) +"/SBDD2021_Heatmaps_of_HTS_Results").mkdir(parents=True, exist_ok=True)
plt.savefig('SBDD2021_Heatmaps_of_HTS_Results/Heatmap of Plate_ID' + str(df.iat[0,0]))