I have a dataframe like
month dest
1 a
1 bb
2 cc
2 dd
3 ee
4 bb
I need to create a set to 4 another dataframe. I am looping over and hope to assign name of dataframe dynamicall inside loop, like
i=1
while i<=4:
dataframe+str(i)=org_dataframe.loc[org_dataframe['month'] == i]
i=i+1
It gives me,
SyntaxError: can't assign to operator
how do I create a dynamic string variable/name of dataframe.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…