Words per Row
notes has a column text. Return a list with the number of words in each text, in row order. Words are separated by single spaces, and an empty text has 0 words.
Example 1
notes {"text":["buy more milk","call mom",""]}
returns [3,2,0]
3, 2 and 0.
Constraints
- The tables are small
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.
More pandas problems
- Above Department AverageMedium
- Above the Middle EverywhereMedium
- Average Experience per ProjectMedium
- Back the Next DayMedium
- Crosstab CountsMedium
- Customers Who Bought EverythingMedium
- Date Range FilterMedium
- Deepest Fall per TickerMedium