I have lot of dataframes created as part of preprocessing. Since I have limited 6GB ram, I want to delete all the unnecessary dataframes from RAM to avoid running out of memory when running GRIDSEARCHCV in scikit-learn.
1) Is there a function to list only, all the dataframes currently loaded in memory?
I tried dir() but it gives lot of other object other than dataframes.
2) I created a list of dataframes to delete
del_df=[Gender_dummies,
capsule_trans,
col,
concat_df_list,
coup_CAPSULE_dummies]
& ran
for i in del_df:
del (i)
But its not deleting the dataframes. But deleting dataframes individially like below is deleting dataframe from memory.
del Gender_dummies
del col