Answers for "string in accessor"

0

Can only use .str accessor with string values!

data.loc['foo'].str.contains("bar")
# turns into
data.loc['foo'].astype(str).str.contains("bar")
Posted by: Guest on March-18-2021

Code answers related to "string in accessor"

Python Answers by Framework

Browse Popular Code Answers by Language