0

I have a data frame with email adresses that I'm trying to shorten.

Here is what my dataframe looks like:

email1 email2 email3 email4
email nan nan nan
nan nan nan nan
nan email nan nan
nan email email nan
nan nan email email

I would like to transform it to look like this:

email1 email2 email3 email4
email nan nan nan
nan nan nan nan
email nan nan nan
email email nan nan
email email nan nan

The dataframe has many NaN values, and when I tried combining columns, I could not find a method that would not replace values with NaNs. I tried using the '+' operator but it would overwrite emails with nan's.

0 Answers0