pandas filter by length code example Example: python - columns that contain the lengh of a string df['name_length'] = df['name'].str.len()