回答編集履歴
1
Series追記
answer
CHANGED
@@ -13,4 +13,21 @@
|
|
13
13
|
3400 yoshiko 0713
|
14
14
|
3566 ruby 0921
|
15
15
|
"""
|
16
|
+
```
|
17
|
+
|
18
|
+
また、Seriesを結合する場合は`concat`が使えます。
|
19
|
+
参考:[Combining two series in pandas along their index [duplicate]](https://stackoverflow.com/questions/18083187/combining-two-series-in-pandas-along-their-index)
|
20
|
+
|
21
|
+
```Python
|
22
|
+
import pandas as pd
|
23
|
+
frame1 = pd.Series([1.11,2.22,3.33])
|
24
|
+
frame2 = pd.Series([4.44,5.55,6.66])
|
25
|
+
ret = pd.concat([frame1, frame2], axis=1)
|
26
|
+
print(ret)
|
27
|
+
"""
|
28
|
+
0 1
|
29
|
+
0 1.11 4.44
|
30
|
+
1 2.22 5.55
|
31
|
+
2 3.33 6.66
|
32
|
+
"""
|
16
33
|
```
|