I need to count the number of values in each row that are greater than zero and store them in a new column
The df bellow:
team goals goals_against games_in_domestic_league
0 juventus 1 0 0
1 barcelona 0 1 1
2 santos 2 1 2
Should become:
team goals goals_against games_in_domestic_league total
0 juventus 1 0 0 1
1 barcelona 0 1 1 2
2 santos 2 1 2 3