Skip to content

Mission 9 - Advanced editing with Python

Learning Objective

In this mission we learn how to manipulate the data using Python snippets.

Knowledge requirement

Basic knowledge of Python or another programming languages.

Data

Please download the required dataset we will use: new_table_cars.xlsx

Steps

  1. Open the data.
  2. In the search bar write your prompt and press enter.
  3. On the left side of the input field, click the pencil to open the code snippet, see Figure below. This is the code that has been generated for your prompt.
  4. Modify the code to your liking and then press run.

Image title

Here we see the corresponding Python code generated for the prompt. This will filter all rows, and remove them if the Width is less than 70.

Image title

Here the result is shown after running the code above. Notice how all the Widths are now greater than 70, as expected from the filter.

Result

Image title

Modifying the Python snippet to add the addition filter to keep rows only if the Length is than 190. As we see this constraint further shrinks the data set down to only three rows.

Well done! Now let's move on to the next mission!