My pandas dataframe has separate columns that are one-hot encoded and a total column at the end that sums them up (`total` = `val1`+`val2`). 

Some rows have 1s for multiple val columns:

```
| name | val1 | val2 | total | 
| joe  | 1    | 0    | 1     |
| bob  | 0    | 1    | 1     |
| dan  | 1    | 1    | 2     |

```

I want this:

```
| name | val1 | val2 | total | 
| joe  | 1    | 0    | 1     |
| bob  | 0    | 1    | 1     |
| dan  | 1    | 0    | 1     |
| dan  | 0    | 1    | 1     |

```

I can't figure out how to get this to work: to melt it conditional upon the total column.

The end result should have a total value of 1 for every row.