dd = {('D', 'F', 'False'): 0, ('T', 'F', 'False'): 1, ('T', 'J', 'False'): 
    2, ('U', 'K', 'True'): 3}
df['tupe'] = zip(df.x, df.y, df.z)
df['new_category'] = df.tupe.map(dd)
assign hash to row of categorical data in pandas