[英]reading multiple csv file into a big pandas data frame by appending the columns of different size
so i am creating some data frame in a loop and save them as a csv file. 所以我在循环中创建一些数据帧,并将它们另存为csv文件。 The data frame have the same columns but different length. 数据帧具有相同的列,但长度不同。 i would like to be able to concatenate these data frames into a single data frame that has all the columns something like 我希望能够将这些数据帧连接到具有所有列的单个数据帧中,例如
df1 ABC 0 0 1 2 1 0 1 0 2 1.2 1 1 3 2 1 2
df2 ABC 0 0 1 2 1 0 1 0 2 0.2 1 2
df3 ABC 0 0 1 2 1 0 1 0 2 1.2 1 1 3 2 1 4 4 1 2 2 5 2.3 3 0
i would like to get something like 我想得到像
df_big ABCABCABC 0 0 1 2 0 1 2 0 1 2 1 0 1 0 0 1 0 0 1 0 2 1.2 1 1 0.2 1 2 1.2 1 1 3 2 1 2 2 1 4 4 1 2 2 5 2.3 3 0
is this something that can be done in pandas? df_big ABCABCABC 0 0 1 2 0 1 2 0 1 2 1 0 1 0 0 1 0 0 1 0 2 1.2 1 1 0.2 1 2 1.2 1 1 3 2 1 2 2 1 4 4 1 2 2 5 2.3 3 0
可以在熊猫身上做到吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.