标签: python loops dataframe
我有一个这样的for循环:
for state in unique_states: #do calculations to get result print(result)
输出如下:
state bins business_id AL 1 47 AL 2 15 state bins business_id AR 1 30 AR 2 5
如何将与每个状态关联的数据另存为DataFrame,以便可以对其进行进一步分析?