Categories#

The following methods are available under the Series.cat attribute.

Series.cat.ends_with(suffix)

Check if string representations of values end with a substring.

Series.cat.len_bytes()

Return the byte-length of the string representation of each value.

Series.cat.len_chars()

Return the number of characters of the string representation of each value.

Series.cat.starts_with(prefix)

Check if string representations of values start with a substring.

Series.cat.physical()

Get the physical values of a Series with a categorical or enum data type.

Series.cat.to(dtype, *[, strict])

Create a Series with a categorical or enum dtype.