Closed
Description
import numpy as np
import pandas as pd
s1 = pd.Series([1, 2, 3], name='x')
s2 = pd.Series(name='y')
# NG, no columns is added
pd.concat([s1, s2], axis=1)
# x
#0 1
#1 2
#2 3
# If padded by value, OK
pd.concat([s1, pd.Series([np.nan]*3, name='z')], axis=1)
# x z
#0 1 NaN
#1 2 NaN
#2 3 NaN
# If converted to frame, OK.
pd.concat([s1.to_frame(), s2.to_frame()], axis=1)
# x y
#0 1 NaN
#1 2 NaN
#2 3 NaN