LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Reshaping Data with pandas

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

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

# Print obesity_split
print(obesity_split)
Code bearbeiten und ausführen