You can use some kind of broadcast:
In [58]: df Out[58]: abc 0 one 0.2 0 1 two 0.4 1 2 two 0.9 0 3 three 0.1 2 4 one 0.0 4 5 two 0.2 5 In [41]: (df.a.values[:,numpy.newaxis] == df.a.unique()).astype(int) Out[41]: array([[1, 0, 0], [0, 1, 0], [0, 1, 0], [0, 0, 1], [1, 0, 0], [0, 1, 0]]) In [54]: ((0 <= df.b.values[:,numpy.newaxis]) & (df.b.values[:,numpy.newaxis] < 0.2)).astype(int) Out[54]: array([[0], [0], [0], [1], [1], [0]]) In [59]: (df.c.values[:,numpy.newaxis] == df.c.unique()).astype(int) Out[59]: array([[1, 0, 0, 0, 0], [0, 1, 0, 0, 0], [1, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 0, 0, 0, 1]])
Then attach all the parts together with pandas.concat or similar.