I am having a dataset as given below:
SNo Names Trans Source Available
1 Anton 0 0 1
2 Bruno 1 1 0
3 Carmi 1 0 1
Based on the values given in above dataset, the output has to be like this:
SNo Names Value
1 Anton ['Available']
2 Bruno ['Trans', 'Source']
3 Carmi ['Trnas', 'Available']
How to display data based on non-zero values in dataset using python?
Try this simple solution: