Untitled



In [9]:
import pandas as pd
import numpy as np

a = pd.Series(data=[1,2,3], index=[4,5,6], dtype=np.int8)
a.name = 'lol'
b = pd.Series(data=[10,20,30], index=[5,6,7], dtype=np.int8)

df = pd.concat([a,b], axis=1).T.fillna(0).astype(np.int8)
print(a)
print(df)


4    1
5    2
6    3
Name: lol, dtype: int8
     4   5   6   7
lol  1   2   3   0
0    0  10  20  30

In [ ]: