Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 314 Bytes

File metadata and controls

8 lines (6 loc) · 314 Bytes

Python determines the length of a character string with the len function. In Python 3, all strings are Unicode strings. len includes trailing blanks. Use len and rstrip to exclude trailing blanks.

.. ipython:: python

   tips["time"].str.len().head()
   tips["time"].str.rstrip().str.len().head()