visions
Visions
What it is and what it does
Visions is a semantic data type library that goes beyond simple type detection by building a graph of type relationships and using that structure to both identify what type your data actually is and infer what it should be. It handles common real-world messiness—integers stored as floats with trailing zeros, missing values, strings that represent numbers—and can automatically clean and cast data to the inferred type.
The package works across multiple data backends (pandas, numpy, spark, and plain Python sequences) through a dispatch-based architecture, letting you define custom semantic types for domain-specific purposes. It ships with a complete default typeset covering common use cases, and you can extend it by registering new type implementations for frameworks like Dask.
Use it for:
- Automatically detect and correct data types in CSV or database imports where type information is lost or ambiguous.
- Build domain-specific type systems for specialized data processing pipelines (e.g., financial, scientific, or categorical data).
- Clean and standardize tabular data before analysis by inferring the intended type and casting accordingly.
- Integrate type detection into data profiling or validation workflows to flag unexpected type patterns.
- Extend type detection to custom backends (e.g., Dask) by registering new type implementations via annotations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Visions defines and detects semantic data types across pandas, numpy, spark, and Python sequences, automatically inferring the most appropriate type even when data has been transformed or corrupted.
Yes. Visions is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real problem in data processing—inferring semantic types from messy real-world data. It is particularly valuable if you work with pandas or need customizable type detection across multiple backends. The permissive BSD-4-Clause license poses no barrier to adoption.
Install
visions on PyPI
pip
pip install visionsuv
uv add visionspoetry
poetry add visionsInstalling visions
Before you install
Low install friction with a pure-Python wheel and six common runtime dependencies. The package is actively maintained with a recent release and no known vulnerabilities.
License in practice
BSD-4-Clause is a permissive license; you may use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.
Quickstart
pip install visions
from visions import typesets
import pandas as pd
df = pd.read_csv('data.csv')
typeset = typesets.CompleteSet()
inferred_types = typeset.infer_type(df)
cleaned_df = typeset.cast_to_inferred(df)
Requires Python 3.9 or later. Plotting type graphs requires pygraphviz to be installed separately.
Verify before relying
- Whether the type inference accuracy holds across all supported backends (pandas, numpy, spark, Python) or varies by framework.
- Performance characteristics when working with very large datasets or deeply nested type hierarchies.
Package facts
| License | BSD-4-Clause (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — numpy, pandas, attrs, networkx, multimethod, puremagic |
| Maintenance | actively maintained — 80 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,374,454/month — #3,988 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: visions-0.8.2-py3-none-any.whl
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
woodworkWoodwork adds a typing layer to pandas…
permissive · top 15,000 on PyPI
semantic-linkConnects Python notebooks to Power BI datasets…
unclear · top 15,000 on PyPI
semantic-link-sempyConnects Python notebooks and Spark jobs in…
unclear · top 5,000 on PyPI
nptypingProvides type hints and runtime type checking…
permissive · top 15,000 on PyPI
ydata-profilingGenerates comprehensive exploratory data…
permissive · top 5,000 on PyPI
category-encodersTransforms categorical variables into numeric…
permissive · top 5,000 on PyPI
qpdQPD translates SQL SELECT statements into…
permissive · top 15,000 on PyPI
data-science-typesProvides PEP-561-compliant type stubs for…
permissive · top 15,000 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
pyspark-pandasProvides tools for distributing Pandas…
unclear · top 5,000 on PyPI