
Chris Parmer
2026-11-16
14 Python Libraries for Data Analysis, Finance, Science, and Engineering
TL;DR
- This page lists 14 open-source Python packages that domain experts use to build data apps in science, engineering, finance, energy, and pharma, 13 of them with a full demo.
- Each demo is built around one real app made with Dash and Plotly on public data, such as a vibration monitor in SciPy, a portfolio risk app in NumPy, or a drug safety app in DuckDB, with the prompts a coding agent needs to build it.
- Coding agents now write most of the code, so what helps most is knowing which package does what and naming it in your prompt. This page is a map of that.
- The packages are grouped by the job they do: loading and querying data, math and simulation, statistics and machine learning, and domain data types (gridded climate data, maps, networks, images, and single-cell data).

Coding agents have changed how people build data apps. A grid analyst, a risk manager, or a biologist can describe the app they want and get working Python back. What the agent still needs from you is direction: "use statsmodels SARIMAX with temperature as a regressor" gets you a better forecast than "predict the load". Knowing which package does what is most of that direction.
Each package below gets a short description of what it's for, one example app, and a link to its demo. Every demo runs on public data, shows the app in screenshots, and gives the prompts to rebuild it with Dash, Plotly's open-source framework for data apps in Python.
The groups on this page:
- Load, clean, and query data: Polars, DuckDB, pandas, narwhals
- Math, simulation, and engineering: NumPy, SciPy, SymPy
- Statistics, forecasting, and machine learning: statsmodels, scikit-learn
- Domain data types: xarray, geopandas, networkx, scikit-image, scanpy
Load, clean, and query data
Every app starts by getting data into tables: reading files, joining sources, aggregating by time, and filtering on what the user picks. For new apps we recommend Polars and DuckDB equally. Both can work through data larger than memory, read only the columns and rows a query needs, and use every core, so an app that starts on one month of data keeps working when it grows to five years. pandas remains the most widely used of the three and a good fit for existing code and smaller tables. Our comparison of DuckDB, Polars, and pandas has benchmarks on the same data.
Polars

Polars is a dataframe library with a query engine written in Rust. You describe a query lazily, and Polars plans it, reads only the columns and row groups it needs, and runs it on every core; pl.sql runs SQL in the same app. Use it for apps over event and time series data such as trips, trades, meter reads, and sensor logs. The demo's fleet operations app answers each chart over 21.2 million taxi trips with a lazy query in a callback. For data in Google BigQuery, the Polars team's polars-bigquery connector sends your column choices and filters to BigQuery, and in our polars-bigquery demo that cut one read of NOAA weather data from 402.6 MB to 0.1 MB.
DuckDB

DuckDB is an in-process SQL database built for analytics, so there's no server to run. It queries Parquet, CSV, and JSON files where they are, keeps tables in a single file next to your app, and reads and returns Polars and pandas dataframes. Its SQL includes window functions, PIVOT, and ASOF JOIN. Use it for apps that run SQL over large files, from regulatory extracts to meter data. The demo's drug safety app loads 32.9 million rows of FDA adverse event reports and ranks the signals for any drug in under a second.
pandas

pandas is the dataframe library most Python data code is written in, with labeled columns, a time index, group-bys, joins, pivots, resampling, and rolling windows, and it has more examples and integrations than any other dataframe library. It works on data in memory, which covers most reports and models. The demo builds a market report for the Texas grid operator (ERCOT) that joins load, prices, the fuel mix, and weather on one hourly index, and caching the raw spreadsheets as Parquet took loading from 22.7 seconds for one year of prices to 0.05 seconds for all four tables.
narwhals

narwhals is a lightweight compatibility layer between dataframe libraries. A library written against it uses a subset of the Polars API and then accepts pandas, Polars, PyArrow, cuDF, and Modin dataframes, plus lazy inputs such as DuckDB, Ibis, and PySpark, without depending on any of them. You rarely call it yourself, but it's the reason the libraries you use accept whichever dataframe you pass: Plotly's Python library depends on it, and so does scikit-learn since 1.9. Above, one Plotly Express call draws the same histogram of 3.6 million taxi trips from four different inputs. The latest release, 2.29.0 (November 17, 2026), adds the Map data type and moves Dask support to a separate narwhals-dask plugin.
Math, simulation, and engineering
These packages do the numerical work behind engineering and finance apps: arrays and linear algebra, signal processing and optimization, and exact symbolic math.
NumPy

NumPy is the array library almost every scientific Python package is built on: fast math on whole arrays, linear algebra, random numbers, and percentiles. Use it for simulation and risk apps that recompute on every slider move. The demo's portfolio risk app runs 50,000 Monte Carlo paths in a callback over 11 exchange-traded funds (ETFs), and shows SPY carrying 44% of the risk with 30% of the money.
SciPy

SciPy adds the algorithms engineers and scientists reach for on top of NumPy: signal filtering and spectra, optimization, curve fitting, interpolation, statistics, and differential equations. Use it for monitoring, test, and lab apps on measured signals. The demo's vibration monitoring app flags all 36 damaged-bearing recordings in a public test set and none of the 4 normal ones, and names the damaged part correctly in 20 of the 36.
SymPy

SymPy does math with symbols instead of numbers: it differentiates, integrates, and solves equations exactly, then turns the results into fast NumPy functions. Use it for calculator and model apps where the formula matters as much as the answer. The demo derives option Greeks with SymPy and runs them on 8,484 SPY option quotes in 60 ms, within a median 0.09 volatility points of Cboe's published values.
Statistics, forecasting, and machine learning
These two packages cover modeling: statsmodels for statistical models you can explain and test, and scikit-learn for predictive models you validate on held-out data.
statsmodels

statsmodels fits statistical and econometric models with full output: regressions with standard errors, time series models such as SARIMAX, vector autoregressions, cointegration tests, and seasonal decomposition. Use it for forecasting and economics apps where you need confidence intervals and tests, not only predictions. The demo's economics app runs on public Federal Reserve Economic Data (FRED), and its seasonal forecast of utility output was off by 2.41% on average over 69 months, against 3.15% for repeating the same month last year.
scikit-learn

scikit-learn is Python's standard library for machine learning on tables: one fit and predict API for regression, classification, clustering, preprocessing, and cross-validation. Use it for prediction apps where a model scores new data in a callback. The demo's five models include an hourly load forecast for Texas that was off by 2.1% on average in 2026, against 4.1% for repeating yesterday's load.
Domain data types
Some data doesn't fit in a flat table: gridded climate fields, shapes on a map, networks, microscope images, and single-cell measurements. Each of these packages gives that data a proper structure and the operations that go with it.
xarray

xarray adds named dimensions and coordinates to multi-dimensional arrays, so you select by latitude, longitude, and date instead of by index, and read NetCDF and Zarr files from climate and weather models. Use it for weather, climate, and renewable energy apps. The demo's site assessment app runs on 25 years of NASA data over Texas and shows 2026 wind running 2.4% below normal across the region.
geopandas

geopandas adds geometry and coordinate systems to pandas, so spatial joins, buffers, overlays, and reprojection work like dataframe operations. Use it for siting, exposure, and territory apps. The demo's site screener joins public layers of 77,839 wind turbines, 89,691 clinical trial sites, county populations, and natural hazards, then screens the area around any spot in the lower 48 states in under 400 ms.
networkx

networkx is Python's standard library for graphs: things connected to other things, such as substations, companies, proteins, or airports, with algorithms for paths, flows, communities, and centrality. Use it for resilience, ownership, and supply chain apps. The demo's stress test app finds that the European grid can move at most 6,580 megavolt-amperes (MVA) from Spain and Portugal into France, through five links.
scikit-image

scikit-image is the image processing library of scientific Python: filters, thresholding, segmentation, and measurements of every object in an image. Use it for microscopy, inspection, and remote sensing apps. The demo's imaging app segments 33,001 cells across a public drug-screening plate and plots how each compound changes cell counts by dose.
scanpy

scanpy analyzes single-cell gene expression data: quality control, normalization, clustering, embeddings such as UMAP, and marker genes for each cell type. Use it for translational and drug discovery apps in pharma and biotech. The demo's atlas app integrates 239,696 cells from five studies, and finds marker genes for 14 cell types in 45 seconds with scanpy 1.13, against 1,209 seconds with 1.12.
How to build apps with these packages
Start from the app, then name the packages. A prompt such as this one gives a coding agent both the use case and the tools:
Prompt: Build a Dash app with Plotly charts for a utility's grid planning team. Load hourly ERCOT load and weather with Polars, forecast the next 14 days with statsmodels SARIMAX using temperature as a regressor, and show the forecast with its 80% interval. Add a page that maps wind resource from a NetCDF file with xarray at any point the user clicks.
Most real apps combine several of these packages. A common pattern is Polars or DuckDB to load and filter, NumPy or SciPy for the math, statsmodels or scikit-learn for models, and Plotly for every chart. Each demo shows what's possible in plain words, with the function names to mention.
When the app is ready, you can deploy it to Plotly Cloud, or to Dash Enterprise on your company's own infrastructure, and share it with your team.
Coming from Power BI, Tableau, Spotfire, MATLAB, or SAS
Many domain experts already do this work in a business intelligence (BI) tool or in MATLAB or SAS. Most of what those tools do has an open-source Python package that covers the same ground, and in a Dash app those packages run in the same callback as the chart that shows the result.
If you use
for
In Python, ask for
Power BI Power Query, Tableau Prep, Spotfire data tables
Loading, joining, and reshaping data
Polars or DuckDB
Power BI DAX measures, Tableau calculated fields and LOD expressions, Spotfire calculated columns
Aggregations, time intelligence, running totals
Window functions in Polars or DuckDB
Power BI, Tableau, and Spotfire forecast lines
Forecasts with intervals
statsmodels (SARIMAX, exponential smoothing) or scikit-learn
Power BI Python and R scripts, Tableau TabPy, Spotfire data functions
Custom R or Python calculations
Any package on this page, called in a Dash callback
Power BI, Tableau, and Spotfire dashboards
Interactive charts, filters, and drill-downs
Dash and Plotly
MATLAB matrices and core math
Array math, linear algebra, simulation, Monte Carlo
NumPy
MATLAB Statistics and Machine Learning Toolbox
Distributions, regression, classification, clustering
SciPy (scipy.stats), statsmodels, and scikit-learn
MATLAB Signal Processing, Optimization, and Curve Fitting Toolboxes
Filters, spectra, fitting, optimization
SciPy
MATLAB Symbolic Math Toolbox
Derivatives, equations, closed-form models
SymPy
MATLAB Image Processing Toolbox
Filtering, segmentation, measurements
scikit-image
MATLAB Mapping Toolbox
Vector map data, projections, gridded rasters
geopandas and xarray
SAS DATA step and PROC SQL
Data preparation and queries
Polars or DuckDB
SAS PROC REG, PROC GLM, PROC LOGISTIC
Regression and statistical models
statsmodels
SAS PROC ARIMA
Time series models
statsmodels
The difference in a Dash app is where the math runs. A BI tool computes what its own formula language can express and calls out to R or Python for the rest, while in Dash the Python is the app, so a slider can rerun a SciPy filter, a statsmodels forecast, or a 50,000-path NumPy simulation, and the chart updates with the answer. All of these packages are free and open source, and Dash apps deploy to Plotly Cloud or to Dash Enterprise inside your company's network.