You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: