Running Python in a browser tab used to be a joke
numpy or pandas, the overhead is remarkably low—around 1.25x for matrix multiplication—because these libraries run as compiled WebAssembly modules rather than being interpreted line-by-line by the Python engine. It’s actually impressive how close they've gotten to near-native speeds.If you need to do quick data munging on a CSV someone just emailed you, you shouldn't be spinning up a local environment. You can just drop it into a JupyterLite instance and get to work. Here is a quick look at how a snippet behaves in these environments; it’s seamless:
temperatures = [28, 31, 33, 29, 27, 34, 30]
avg = sum(temperatures) / len(temperatures)
hot_days = [t for t in temperatures if t > 30]print(f"Weekly average: {avg:.1f}C")
print(f"Hot days: {len(hot_days)}")
The real catch, and I have to be the skeptic here, is the lack of system access. If your workflow relies heavily on os.system() calls, spawning subprocesses, or interacting with arbitrary local file structures, you're going to hit a wall because the browser sandbox is designed to keep things isolated. You also have to deal with CORS restrictions when making network requests, which can be a headache if you aren't used to web security protocols. But for 90% of data science, learning, and rapid prototyping, the friction-less nature of running Python in a tab beats the traditional "install everything" headache every time.