Here is what I have
>>> s = pd.Series([0,2,1,0], ['t1','t2','t3','t4'])
>>> s
t1 0
t2 2
t3 1
t4 0
dtype: int64
I want an output which looks like this with binary indicators for each value as pandas dataframe:
value t1 t2 t3 t4
0 1 0 0 1
1 0 0 1 0
2 0 1 0 0