I have a dataframe that looks like this (but longer):
Letter Password
0 l klfbblslvjclmlnqklvg
1 h pghjchdxhnjhjd
How do I count the number of occurences of Letter in Password? Such that it is 6 for the first row and 4 for the second row.
This does not work, because count needs a regex:
df['Occurrences'] = df['Password'].str.count(df['Letter']).astype(int)
How can I do it then?