Create DataFrame from multiple Series
<p>I have 2 <code>Series</code>, given by:</p>

<pre><code>import pandas as pd

r = pd.Series()
for i in range(0, 10):
    r = r.set_value(i,i*3)
r.name = 'rrr'

s = pd.Series()
for i in range(0, 10):
    s = s.set_value(i,i*5)
s.name = 'sss'
</code></pre>

<p>How to I create a <code>DataFrame</code> from them?</p>

<p>You can use pd.concat:</p>

<pre><code>pd.concat([r, s], axis=1)
Out: 
   rrr  sss
0    0    0
1    3    5
2    6   10
3    9   15
4   12   20
5   15   25
6   18   30
7   21   35
8   24   40
9   27   45
</code></pre>

<p>Or the DataFrame constructor:</p>

<pre><code>pd.DataFrame({'r': r, 's': s})

Out: 
    r   s
0   0   0
1   3   5
2   6  10
3   9  15
4  12  20
5  15  25
6  18  30
7  21  35
8  24  40
9  27  45
</code></pre>

python python-2.7 pandas dataframe