--- id: visions version: "0.8.2" license: BSD-4-Clause license_treatment: permissive maintenance: active --- # visions — Visions License: permissive · Maintenance: active · Downloads: 1.4M/mo ## 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 above — 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 pip install visions uv add visions poetry add visions ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags semantic data type detection, automatic type inference, data type classification, tabular data type detection, pandas type inference, data cleaning and type casting, custom semantic types, data-type-inference, tabular-data, multi-backend [View on SkillFed](https://skillfed.io/packages/visions) · [View on PyPI](https://pypi.org/project/visions/)