pandas - Working with Strings

Author: ruchigarg-DSCreated Oct 20, 2018Updated Aug 8, 2025
Labelsbughelp wanted

In the code cell 3: data = ['peter', 'Paul', None, 'MARY', 'gUIDO'] data.map(lambda s: s.capitalize()) was changed to [s.capitalize() for s in data if s!= None ] and now the code woks fine.

Source: donnemartin/data-science-ipython-notebooks