I'm very noob in python. My dict:
my_dict:{0:['12531','1253145','251231','151315','51555'],
1:['1551','12554','454545']}
I need to convert this as a DataFrame:
ID Cluster
12531 0
1253145 0
251231 0
151315 0
51555 0
1551 1
12554 1
454545 1
I tried using
pd.DataFrame.from_dict({(i,j):clusters[i][j]
for i in clusters.keys()
for j in clusters[i].keys()}
,columns=['Cluster','ID'])
but it is not what I want.