使用concat()函数拼接两个表格,出现以下错误:

TypeError: first argument must be an iterable of pandas objects, you passed an object of type "DataFrame"

解决方法:

最后一行必须采用以下格式:

df=pd.concat([df1,df2,df3,df4,...], ignore_index=True)

问题得以解决。

相关问题,可参考:https://stackoverflow.com/questions/39534676/typeerror-first-argument-must-be-an-iterable-of-pandas-objects-you-passed-an-o

Logo

一站式虚拟内容创作平台,激发创意,赋能创作,进入R空间,遇见同道,让优质作品闪耀发光。​

更多推荐