I am trying to create a dictionary and I want to flush data from the dataframe cluster_set at the start of each iteration. I am using the following code.
Please let me know if more input is required from my end as I am new to this platform and python as well.....:D So, so I am not sure how much info is required.
for x in uni_cluster:
cluster_boo = pd.Series([] , dtype = bool)
cluster_boo = pdf_copy['Clus_Db'] == x
cluster_set = pdf_copy[cluster_boo]
cluster_dic = {x: cluster_set for x in uni_cluster}