DamianLukasik / date-a-scientist

0 stars 0 forks source link

Simpler way to get essay length #3

Open mackenzieyoung opened 5 years ago

mackenzieyoung commented 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)

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.