# Get all rows that contain a substring
df[df[column_name].str.contains(substring)]
# Get all rows that do NOT contain a substring
df[~df[column_name].str.contains(substring)]
# Get all rows that contain one substring OR another substring
df[df[column_name].str.contains(substring1|substring2)]
# Ignore NaN values
df[df[column_name].str.contains(substring, na=False)]