For loop in pandas

How can i iterate for loops in dataframes? For example, let’s say I want to find the word ‘treasure’ in a column. Should I iterate all the indexes? What is the syntax?

I think you can use series.str.contains() which will give you a True/ False result.

But, double check the documentation here:

Or, maybe try df.isin()


This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.