dongxiao
2021-03-26 15:25:23 +08:00
```python
col1 = pd.Series(['a', 'b'])
col2 = pd.Series(['x', 'y'])
col3 = pd.Series(['1', '2'])
col1, col2, col3 = map(pd.DataFrame, [col1, col2, col3])
col1.index = [1 for _ in range(len(col1))]
col2.index = [1 for _ in range(len(col2))]
col3.index = [1 for _ in range(len(col3))]
r = (
col1
.join(col2, how="outer", lsuffix="_col1", rsuffix="_col2")
.join(col3, how="outer")
)
r.columns = ["col1", "col2", "col3"]
print(r)
```