import pandas as pd

# Create a sample dataframe
data = {'Name': ['John', 'Mike', 'Sarah', 'John', 'Mike'],
        'Age': [30, 25, 22, 30, 25],
        'Gender': ['M', 'M', 'F', 'M', 'M']}
df = pd.DataFrame(data)

# Method 1: Using the pandas duplicated() function
print(df.duplicated())