given the following data:
pd.DataFrame(dict(
name = ['a', 'a', 'a', 'b', 'b', 'b'],
vals = [1, 2 , 3, 99, 3, 4]
))
which looks as:
name vals
0 a 1
1 a 2
2 a 3
3 b 99
4 b 3
5 b 4
I'm wondering how to create the following:
1 2 3 4 99
a true true true false false
b false false true false true
Note - having the exact values of true
and false
in the above aren't so important, I don't know how to go about creating a table of this type at the moment.