I have a pandas dataframe.
df = pd.DataFrame(['Donald Dump','Make America Great Again!','Donald Shrimp'],
columns=['text'])
What I like to have is another column in Dataframe which has the length of the strings in the 'text' column.
For above example, it would be
text text_length
0 Donald Dump 11
1 Make America Great Again! 25
2 Donald Shrimp 13
I know I can loop through it and get the length but is there any way to vectorize this operation? I have few million rows.