Search for Kit Within Python
This guide walks you through how to search for a kit directly within your Python file using Arctic Fox. For the example, we'll sort a dataframe by year. By the end, you'll know how to:
- search for a kit while in Python
- select a kit from the results
- use the chosen kit to generate the code you need
Setup
We're starting with a dataset already loaded using the Data kit, and we're viewing it using the View kit. You should see your dataframe displayed as shown below:

Search for a Kit
To search for a kit from within your Python file:
- Place your cursor where you want to search.
- Press 'alt + ?'.
This will insert the line:
#> ?
into your Python file. It also opens the Arctic Fox pane and syncs your search text with the kit dropdown.

Now, simply type what you want to do after the '#> ?'.
In our case, we typed:
#> ? order year ascending
As you type, the Arctic Fox pane will filter the list of available kits that match your query.

Pressing Enter on the '#> ?' line in your code will select the first result from the search and replace the line with that kit. In this example, the 'RowSort' kit was selected.
When this happens:
- The '#> ?' line is replaced with the selected kit
- A '?' is automatically passed in as an option, which triggers the guide for that kit

Use the RowSort Kit
Now it's time to configure the RowSort kit.
Click the last select button to begin specifying the options for the kit. Arctic Fox will walk you through setting each option with helpful descriptions and examples.

We'll use the following options:
- Set --columns to Year
- Set --order to ascending

Now run the kit to generate the code.
Arctic Fox will generate the appropriate code to sort your dataframe by the Year column in ascending order.

Finally, run your Python script. You should see the printout from the View kit reflect the new sort order.

Summary
In this guide, you:
- Used 'Alt + ?' to start a kit search from your Python file
- Entered a natural language search to find a relevant kit
- Selected the 'RowSort' kit and explored its guided setup
- Generated code to sort your dataframe by the 'Year' column in ascending order
That's it - another step forward with Arctic Fox.
Stay tuned for more guides and happy coding!