How would I remove columns from a data frame when both rows for that column have non-zero values.

For example I want to change the following table from the following

| Dogs | Cats | Snakes | Elephants |
| --- | --- | --- | --- |
| 1 | 0 | 1 | 3 |
| 2 | 1 | 0 | 2 |

to the following

| Cats | Snakes |
| --- | --- |
| 0 | 1 |
| 1 | 0 |

The reason the other columns are removed is because both rows had non-zero numbers. If one of the two rows has a zero then we'd retain the entire column. It does not matter which one contains the zero.

I tried to use dyplr and if else statements but most of those are based on single conditions in the column being met.