Find first occurrence of a substring in a dataframe column [duplicate]

Solution 1:

You can do that with the following.

df.Mood.str.contains("Happy").idxmax()