Can only use .str accessor with string values code example
Example: Can only use .str accessor with string values!
data.loc['foo'].str.contains("bar")
# turns into
data.loc['foo'].astype(str).str.contains("bar")
data.loc['foo'].str.contains("bar")
# turns into
data.loc['foo'].astype(str).str.contains("bar")