擅长:python、mysql、java
<p><a href="https://pandas.pydata.org/pandas-docs/stable/merging.html" rel="noreferrer">^{<cd1>}</a>将用于R中的<a href="https://stat.ethz.ch/R-manual/R-devel/library/base/html/cbind.html" rel="noreferrer">^{<cd2>}</a></p>
<pre><code>import pandas as pd
df1 = pd.DataFrame({'col1': [1,2], 'col2':[3,4]})
df2 = pd.DataFrame({'col1': [5,6], 'col2':[7,8]})
print(df1)
print(df2)
print(pd.concat([df1, df2]))
</code></pre>
<p>结果将是:</p>
<pre><code> col1 col2
0 1 3
1 2 4
col1 col2
0 5 7
1 6 8
col1 col2
0 1 3
1 2 4
0 5 7
1 6 8
</code></pre>
<p>如果您仔细阅读文档,它还会解释其他操作,如cbind等</p>