Public
Edited
Mar 29, 2023
Insert cell
Insert cell
Insert cell
pyodide.FS.writeFile(
"/model_snp_info.csv",
await (await fetch(snpFileUrl)).text(),
{ encoding: "utf8" }
);
Insert cell
{
await pyodide.loadPackage("pandas");
pyodide.runPython(`
import pandas as pd
snp_info = pd.read_csv("/model_snp_info.csv");
`);

return pyodide.runPython(`snp_info.shape`).toJs();
}
Insert cell
Insert cell
pyodide = {
const pyodide = await require("https://cdn.jsdelivr.net/pyodide/v0.22.0/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