【发布时间】:2017-07-09 01:49:17
【问题描述】:
我已经生成了很多字符串变量如下
for i in range(10):
r='df'+str(i)
r== pd.DataFrame(np.random.rand(4, 5),
index=["A", "B", "C", "D"],
columns=["I", "J", "K", "L", "M"])
我得到的结果是
TypeError: Could not compare ['df0'] with block values
我期待得到
df0, df1, ... df9
具有相同的索引和列但不同的值。
【问题讨论】:
标签: python-3.x pandas jupyter-notebook