擅长:python、mysql、java
<p>如果需要字符串输出,可以使用concancement all<code>DataFrame</code>s:</p>
<pre><code>df = '(' + df1 + ' , ' + df2 + ')'
#if numeric columns first cast to str
#df = '(' + df1.astype(str) + ' , ' + df2.astype(str) + ')'
print (df)
1 2 3 4
a (t1a1 , t2a1) (t1a2 , t2a2) (t1a3 , t2a3) (t1a4 , t2a4)
b (t1b1 , t2b1) (t1b2 , t2b2) (t1b3 , t2b3) (t1b4 , t2b4)
</code></pre>
<p>如果需要元组:</p>
^{pr2}$