swifter
A package which efficiently applies any function to a pandas dataframe or series in the fastest available manner
What it is and what it does
Swifter is an extension that intercepts apply operations on DataFrames and Series, then automatically chooses the fastest execution path: vectorization when possible, or parallel processing when not. It wraps the standard apply interface, so you call `.swifter.apply()` instead of `.apply()` and let the package decide whether to run on a single core, multiple cores, or a distributed backend.
The package is designed for data-processing workflows where apply operations are a bottleneck. It includes optional extras for notebook progress bars and groupby-apply support. However, it carries a significant caveat: sample applies are run during optimization, so functions with side effects (modifying external state) will produce incorrect results.
Use it for:
- Speed up element-wise transformations on large Series by automatically vectorizing or parallelizing the operation.
- Apply complex row-wise functions without manually managing parallel backends.
- Optimize groupby().apply() chains when the function cannot be vectorized.
- Migrate existing code to parallel execution with minimal refactoring.
- Benchmark apply performance across different execution strategies in a single call.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Swifter applies functions to DataFrames and Series using automatic vectorization or parallel processing to speed up operations beyond standard apply.
Yes, if you have large DataFrames and apply-heavy workflows where standard apply is too slow. However, proceed with caution: maintenance is dormant (last release 2023-07-31), license status is unclear, and Python version support is unspecified. Test compatibility with your environment before relying on it in production. Not suitable for functions with side effects.
Install
swifter on PyPI
pip
pip install swifteruv
uv add swifterpoetry
poetry add swifterInstalling swifter
Before you install
Installation friction is high with no runtime dependencies listed. Maintenance is dormant—the last release was 2023-07-31, with the last commit in 2024-03-20. No active development signal.
License in practice
License status is unclear; no SPDX identifier or raw license text is available in the metadata. Verify the actual license before use in proprietary or restricted contexts.
Quickstart
import swifter
df.swifter.apply(lambda x: x**2)
Requires an external dataframe library (pandas or modin) to be installed and imported separately before swifter.
Verify before relying
- Actual license identifier and terms—metadata shows 'unclear' treatment with no SPDX or raw text.
- Whether dormant maintenance since 2023-07-31 affects compatibility with recent dataframe library versions.
- Python version compatibility—requires_python is empty in metadata.
- Runtime dependencies on dask or other parallel backends for full functionality.
Package facts
| License | not declared (unclear) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | dormant — 1,110 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 10,262,816/month — #1,464 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: swifter-1.4.0.tar.gz
Keywords: pandas, dask, apply, function, parallelize, vectorize
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
mapplyProvides a lightweight, customizable multi-core…
permissive · top 15,000 on PyPI
modinModin is a drop-in replacement for pandas that…
permissive · top 5,000 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
pandas-flavorRegisters custom methods and accessors on…
permissive · top 5,000 on PyPI
pandarallelPandarallel parallelizes pandas DataFrame…
permissive · top 15,000 on PyPI
dask-exprDask Expressions provides query optimization…
permissive · top 5,000 on PyPI
ipfnIterative proportional fitting algorithm that…
permissive · top 15,000 on PyPI
cudf-cu12cuDF is a GPU-accelerated DataFrame library…
permissive · top 15,000 on PyPI
gspread-dataframeConverts between Google Sheets worksheets and…
permissive · top 5,000 on PyPI
awkward-pandasExtends pandas DataFrames to store and…
permissive · top 15,000 on PyPI