C3 AI Documentation Home

Select or Drop Columns

Select columns to keep or remove in a Visual Notebooks dataframe.

Configuration

FieldDescription
NameA user-specified node name displayed in the workspace
Selection methodKeep or remove the selected columns Select columns to keep and delete the remaining columns, or select columns to delete and keep the remaining columns.
Select Columns to CombineThe columns to keep or remove Select all numeric columns, all string columns, or specific columns from the dropdown menu. The "All numeric columns" option selects all columns with decimal, integer, and long data types.

Node Inputs/Outputs

InputA Visual Notebooks dataframe
OutputA dataframe with only the desired columns

Example dataframe output

Figure 1: Example dataframe output

Examples

  • Connect a "Select or Drop Columns" node to an existing node.
  • Leave "Select Columns to Keep" and "Select specific columns" selected.
  • Select one or more columns from the auto-populated dropdown menu.
    • In this example, the "Name" and "Adopted" fields are selected.

Select fields to keep from the dropdown menu

Figure 2: Select fields to keep from the dropdown menu

  • Select "Run" to create a dataframe that contains only the selected fields.

Example dataframe with only the selected fields

Figure 3: Example dataframe with only the selected fields

  • Select the "Select Columns to Drop" option.
  • Select the "All string columns" option.
  • Select "Run" to create a dataframe without columns with the string data type.

Example dataframe with string columns dropped

Figure 4: Example dataframe with string columns dropped

Was this page helpful?