Dataslope logoDataslope · Learn

Python

Run Python in the browser via Pyodide. NumPy, Pandas, Matplotlib, and Plotly are all available.

The Python runtime is Pyodide 3.13 running inside a Web Worker so your code doesn't block the UI. Each block below runs against a fresh global scope — variables you define in one block won't leak into the next.

Variables and printing

Python doesn't need type declarations — assigning with = creates the binding. Try editing the multiplier and re-running.

PyBlock-2995Python 3.13.2

DataFrames render as tables

Anything passed to display() (or returned as the last expression of a block) is rendered with its rich representation. For a Pandas DataFrame that means an HTML table.

The block below has initialization code — click "▸ Initialization code (Python)" to see what's running before your snippet.

PyBlock-9333Python 3.13.2

Matplotlib figures

plt.show() captures the current figure as an inline PNG.

PyBlock-c15dPython 3.13.2

Interactive Plotly charts

Plotly figures render as fully interactive charts — the same rendering path the Python Playground uses.

PyBlock-ef86Python 3.13.2

On this page