Chaining with Code Assist

The Transformations widget can be used to chain together multiple operations.

For this tutorial we’ll use the Titanic data.

  1. Hover over the assistant icon icon. Select the Transformations item from the popup menu. Select the Groupby and aggregate option.

  2. Specify Pclass and Embarked as the columns to group by. Choose Fare as the column to aggregate. Select mean as the aggregator function. Press the Add Transformation button.

    Specify transformaiton options
  3. The preview is updated with the summary data.

  4. Next we’re going to filter the rows. Specify Embarked as the columns to filter by. Choose != as the operator and Q as the value. Turn the as string toggle on. Press the Add Transformation button.

    Filter the rows
  5. The preview is updated with the filtered data. Finally select the Drop columns option and specify Embarked as the column to drop. Press the Add Transformation button.

  6. The preview is updated. Press the Insert Code button.

  7. The required code is inserted into the notebook and immediately executed.

    Code is inserted and executed

Next steps