Skip to content
Advertisement

How can I convert into lower case the first letter of each word in a pandas colum?

I would like how to convert the first letter of each word in this column:

JavaScript

Into lower case, in order to have

JavaScript

I know there is capitalize() but I would need a function which does the opposite.

Many thanks

Please note that the strings are within a column.

Advertisement

Answer

I don’t believe there is a builtin for this, but I could be mistaken. This is however quite easy to do with string comprehension!.

JavaScript

Where line is each individual line.

Advertisement