I have dataset that the column is datetime type, I have converted its column to object type for easier checking. In this case, i want to check any column whatever the value are equal to 1, but if the column there are not any value or NaN are equal to 0. Example;
Year1. | Year.2 | Year.3 |
12-01-2021 NaN NaN
NaN 11-01-2021 12-02-2020
I want the result is:
Year1. | Year.2 | Year.3 |
1 0 0
0 1 1
Anyone can help me to solve this case? Thank you in advance