Tutorials

This hands-on Python tutorial introduces the Positron Integrated Development Environment.

Learn Positron with Python: inspect, clean, analyze, and visualize 5,130 sales orders using Data Explorer, scripts, notebooks, and Posit Assistant.

Key Takeaways

  • Positron is a free, VS Code-based IDE for data science workflows, combining data inspection, Python scripting, notebooks, and AI assistance in one workspace.
  • The tutorial uses a dataset of 5,130 fictional sales orders to analyze how median order value differs between retail and wholesale orders across product categories.
  • It promotes a structured workflow: inspect raw data with Data Explorer, clean data in saved scripts or notebooks, then analyze and visualize results reproducibly.
  • Posit Assistant can help generate explanations, analyses, and visualizations, while notebooks are especially useful for exploring intermediate results.

Meta description: Learn Positron with a Python tutorial that inspects, cleans, analyzes, and visualizes 5,130 sales orders using scripts, notebooks, and Posit Assistant.

This hands-on Python tutorial introduces the Positron Integrated Development Environment.

Tags: Positron, Python tutorial, data cleaning, pandas, notebooks

Featured image: abstract, friendly illustration style showing a data table, Python code, and charts, with no real people, no logos, and no text.

In a Positron Python tutorial, data analysts can inspect, clean, analyze, and visualize a dataset of 5,130 fictional sales orders for olive oil, bath products, and gift baskets. The tutorial is designed for readers who want to use Positron, a free integrated development environment for data science projects, to answer one business question: how does median order value differ between retail and wholesale orders across product categories? It combines raw data inspection, saved Python code, notebook work, and Posit Assistant in one workspace.

What This Positron Tutorial Does

Positron puts data inspection and coding in the same workspace, so readers can examine the data first and then watch results take shape as code runs. The tutorial uses a small dataset and Python, although Positron is built on the open-source foundation of Visual Studio Code and supports both Python and R workflows.

This hands-on Python tutorial introduces the Positron Integrated Development Environment.

The workflow is organized around four ideas. Data Explorer, Positron's inspection tool, helps find quality issues before cleanup steps in Python. Data cleaning belongs in saved code, whether that is a script or a notebook, so fixes stay reproducible and the analysis starts from clean data. Scripts and notebooks let users produce and visualize intermediate results as the analysis develops. Posit Assistant, an AI agent, can suggest explanations, analyses, and visualizations for the data being worked with.

The materials include ready-to-run notebooks and the sales dataset. Readers can also test their understanding with an interactive quiz titled Positron IDE: A Hands-on Python Tutorial, which covers exploring raw data and cleaning it in scripts and notebooks and gives a score on completion. The full source article is available at https://realpython.com/positron-ide/. The source also promotes Python Tricks, a short and sweet Python trick email delivered every couple of days.

Get Started With Positron

To follow the steps, readers need basic familiarity with pandas DataFrames, Matplotlib, and uv. If uv is not already installed, install it first. The examples use pandas 3.0.5 and Matplotlib 3.11.2, and the interface instructions target Positron 2026.09.1-2.

Install Positron after checking storage requirements, because the installer can require over 1 GB of space on some platforms. On Windows, the latest Visual C++ Redistributable must also be installed. Download the installer for your operating system, run it, and follow the on-screen instructions. A fresh installation shows Positron's Fresh Start User Interface.

Because Positron is built on Visual Studio Code's open-source codebase, it can import existing Visual Studio Code settings. For this tutorial, skip that step by clicking Later in the pop-up box in the lower-left corner. Then choose Open Folder from the File menu or from the Primary Side Bar and open the folder that contains the materials.

This hands-on Python tutorial introduces the Positron Integrated Development Environment.

The project includes these files: data/sales_data.csv, notebooks/explore_sales.ipynb, src/analyze_sales.py, src/prepare_sales.py, pyproject.toml, and uv.lock. The sales_data.csv file contains 5,130 fictional orders for olive oil, bath products, and gift baskets. In any data analysis workflow, data cleaning is probably the most important step. The prepare_sales.py script checks and cleans the source data. The analyze_sales.py script analyzes the cleaned data, and explore_sales.ipynb reproduces the work of both scripts in one place. The pyproject.toml file lists starting dependencies. The uv tool manages the project and generates uv.lock to record resolved dependency versions; readers should not edit uv.lock by hand because uv keeps it up to date.

Steps to Inspect and Clean the Sales Data

Readers can create a Python virtual environment without leaving the editor.

  1. Open the Command Palette with Control plus Shift plus P on Windows or Linux, or Command plus Shift plus P on macOS, and run Python: Create Environment.
  2. When Positron asks for the environment provider, select uv. When it asks for the Python version, select 3.14.
  3. Positron creates a .venv folder in the project, discovers it, and selects it for the Python session. It also bundles the IPython kernel, so the Console can be used without installing anything else.
  4. Choose View, then Terminal from the main menu. The Terminal opens in the Panel at the bottom, starting a new session with the Python environment activated.
  5. If the environment name does not appear in parentheses, activate it manually. On Linux and macOS, run `source .venv/bin/activate`. On Windows, run `.venv\Scripts\Activate.ps1` in PowerShell.
  6. Use Data Explorer to inspect the raw sales_data.csv file and look for quality issues before running cleanup code.
  7. Run or edit prepare_sales.py to clean the data, then run analyze_sales.py to calculate median order value for retail and wholesale orders across product categories.
  8. Repeat or extend the work in explore_sales.ipynb, using the notebook to produce and visualize intermediate results as the analysis develops.
  9. Try Posit Assistant to request possible explanations, analyses, and visualizations for the data under review.

Scripts, Notebooks, and Posit Assistant

The tutorial keeps the important separation between inspection and reproducible cleanup. Data Explorer helps users find quality issues first, but the durable cleaning work should live in saved code. A script is useful when the transformation is stable and reusable, while a notebook is useful when the analysis changes as intermediate charts and tables are examined. explore_sales.ipynb shows how the notebook path can reproduce the work of prepare_sales.py and analyze_sales.py in one place.

Posit Assistant adds a guided layer to the same workspace. It can suggest explanations, analyses, and visualizations, but the tutorial still asks the reader to decide whether the tool fits the way they and their team work with data. For teams already using Visual Studio Code, the familiar foundation can make the move easier. For teams focused on Python, the tutorial uses a small dataset, so the main goal is to learn the workflow. The next step is to run the sample scripts and notebook, compare the median order value results for retail and wholesale orders across product categories, and use the quiz to check understanding.

Common Mistakes

  • Treating Data Explorer as the cleanup tool instead of the inspection tool; quality checks should be followed by saved Python code.
  • Editing uv.lock by hand rather than letting uv manage resolved dependency versions.
  • Forgetting to activate the environment if the environment name does not appear in parentheses in the Terminal.
  • Skipping the Windows Visual C++ Redistributable requirement, which can prevent Positron from installing correctly.
  • Installing with less than the needed storage when the installer can require over 1 GB of space on some platforms.
  • Using Posit Assistant to replace the analysis instead of using it to suggest explanations, analyses, and visualizations that the saved code can then confirm.

Comments (0)

  1. No comments yet. Be the first to share what worked for you.

Leave a comment

Comments are reviewed before they appear. Your email address is not published.