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