1#df is a data frame and emails is a column.
2emails = df.loc[:, 'EMAIL']
3# wanted to filter the data from emais column where email id has gmail in it
4gmail_emails = df[emails.str.contains('@gmail')]
5
6#For more information:
7https://kanoki.org/2019/11/12/how-to-use-regex-in-pandas/