hen*_*axe 10 python-3.x pandas
所以我有一个数据帧列表。当尝试附加它们时,我得到:
pandas.errors.InvalidIndexError: Reindexing only valid
with uniquely valued Index objects
Run Code Online (Sandbox Code Playgroud)
但是,我的索引是唯一的,例如:
dfList[0].index
Index(['5560654070'], dtype='object')
fList[1].index
Index(['5562221068'], dtype='object')
Run Code Online (Sandbox Code Playgroud)
当append()、 或 时concat(),都会给出上述错误。
dfList[0].append(dfList[1])
"""
pandas.errors.InvalidIndexError: Reindexing only valid with uniquely valued Index objects
"""
Run Code Online (Sandbox Code Playgroud)
我reset_index()也尝试过ignore_index=True,但似乎没有任何效果。