Skip to content
Advertisement

Add a comma after two words in pandas

I have the following texts in a df column:

JavaScript

What I need is to add a comma at the end of each row but the condition that it is only two words. I found a partial solution:

JavaScript

(solution found in stackoverflow)

Advertisement

Answer

Given:

JavaScript

Doing:

JavaScript

Outputs:

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