DataFrame合并数据df.append
import pandas as pd from pandas import DataFrame df1 = DataFrame([[1.4,2],[7.1,-4.5], [2,3],[0.75,-1.3]], columns=['one','two']) print(df1) df2 = DataFrame([[1.4,2],[7.1,-4.5], [2,3],[0.75,-1.3]], columns=['one','two']) print(df2) df3 = df1.append(df2).reset_index(drop=True) print(df3)
one two
0 1.40 2.0
1 7.10 -4.5
2 2.00 3.0
3 0.75 -1.3
one two
0 1.40 2.0
1 7.10 -4.5
2 2.00 3.0
3 0.75 -1.3
one two
0 1.40 2.0
1 7.10 -4.5
2 2.00 3.0
3 0.75 -1.3
4 1.40 2.0
5 7.10 -4.5
6 2.00 3.0
7 0.75 -1.3
本文来自博客园,作者:OTAKU_nicole,转载请注明原文链接:https://www.cnblogs.com/nicole-zhang/p/14432679.html