Public
Edited
Nov 8, 2024
1 fork
2 stars
Insert cell
Insert cell
pyodide.runPython(`
import sys

f"Hello, from Python version: {sys.version}!"
`)
Insert cell
Insert cell
pd = {
await pyodide.loadPackage("pandas");

return pyodide.runPython(`
import pandas as pd

pd
`);
}
Insert cell
pd.__version__
Insert cell
df = pd.read_csv(
pyodide.pyodide_py.open_url("https://raw.githubusercontent.com/jeyabbalas/py-icare/master/data/bc_72_snps.csv")
)
Insert cell
df.shape.toString()
Insert cell
df.loc.get(0).toString()
Insert cell
Inputs.table(
df.to_dict("records")
.toJs()
.map(Object.fromEntries)
)
Insert cell
Insert cell
pyodide = {
const pyodide =
await require("https://cdn.jsdelivr.net/pyodide/v0.21.2/full/pyodide.js");
return pyodide.loadPyodide();
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more