Created
December 30, 2025 18:16
-
-
Save JessicaWachtel/45e9e91523fa3f01f323d2d0fd594fec to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pyodide.runPython(` | |
| import pandas as pd | |
| from io import StringIO | |
| from js import document | |
| # Load CSV | |
| df = pd.read_csv(StringIO(csv_text)) | |
| # Show first rows | |
| document.getElementById("data-output").innerText = df.head().to_string() | |
| # Populate column dropdown | |
| select = document.getElementById("column-select") | |
| select.innerHTML = "" | |
| option_default = document.createElement("option") | |
| option_default.value = "" | |
| option_default.text = "--Select--" | |
| select.appendChild(option_default) | |
| for col in df.columns: | |
| option = document.createElement("option") | |
| option.value = col | |
| option.text = col | |
| select.appendChild(option) | |
| # Show summary statistics | |
| summary_text = df.describe().to_string() | |
| document.getElementById("summary-output").innerText = summary_text | |
| `); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment