Get startedGet started for free

The good old split

You have to do one last task for the obesity project. Your colleague gave you a new dataset to analyze with which you will perform the same analysis as before.

After inspecting the dataset obesity, you realize that you have the same columns as before, but the bounds column is not a list. This time, the column contains two values separated with a hyphen in the form of string.

You will process the string and then transform the column.

The DataFrame obesity is available in your session.

This exercise is part of the course

Reshaping Data with pandas

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Split the columns bounds using a hyphen as delimiter
obesity_split = ____[____].____.____(____)

# Print obesity_split
print(obesity_split)
Edit and Run Code