

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Welcome to Pandas
incomplete
2: Data Types
incomplete
3: Extracting Data
incomplete
4: Dates and Times
incomplete
5: Datetime Math
incomplete
6: Comparing Dates
incomplete
7: List Comprehensions
incomplete
8: Dictionary Comprehensions
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Data work can get messy fast, so a reliable workflow often uses 7 stages:
Click to play video
Let's practice extracting readings from a raw string. Python's str.split() method splits a string into a list using the provided separator:
raw_statuses = "true,false,false,true"
status_strings = raw_statuses.split(",")
# ["true", "false", "false", "true"]
Fix the bug in the extract_statuses function.
Pass "," to the str.split() call so each status becomes its own string. The rest of the provided function converts them to booleans and returns a Pandas Series.