Open mackenzieyoung opened 5 years ago
https://github.com/DamianLukasik/date-a-scientist/blob/40f76c29419c0f3cd825f63af9d253f987c6a36c/Python%20Project/dating.py#L100
This is a simpler way to get essay length: all_data["essay_len"] = all_essays.apply(len)
all_data["essay_len"] = all_essays.apply(len)
In general, you don't need to use a lambda operator if there's already a built-in function that does what you want to do.
https://github.com/DamianLukasik/date-a-scientist/blob/40f76c29419c0f3cd825f63af9d253f987c6a36c/Python%20Project/dating.py#L100
This is a simpler way to get essay length:
all_data["essay_len"] = all_essays.apply(len)
In general, you don't need to use a lambda operator if there's already a built-in function that does what you want to do.