python code to create column in last code example Example: create new column with length of old column value python df['length'] = df['column'].str.len()