Skip to content
Advertisement

Adding a full stop to text when missing

How to add a full stop to a text please? I am not able to get the desired combined text.

JavaScript

Desired output

combined_df snapshot

Advertisement

Answer

You can use where and cat:

JavaScript

Result:

JavaScript

(this also works for the case when text1 is given and text2 is NaN)

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement