Install & Compatibility
Where this runs
tested against v0.8.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 181.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 8.9s · import 0.000s · 174MB
183MB installed
● package 183MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
detect_type
✓ from visions import detect_type
✗ from visions import detect_type
This example demonstrates how to use `visions` to detect the data type of a Pandas Series and then cast it to a different specified type using a standard typeset.
import pandas as pd
from visions import detect_type, cast_to_detected_type
from visions.types import Integer, String
from visions.typesets import StandardTypeset
# Example data
data = pd.Series([1, 2, 3, 4, 5])
# Initialize a typeset
typeset = StandardTypeset()
# Detect the initial type of the data
initial_type = detect_type(data, typeset)
print(f"Detected initial type: {initial_type.__class__.__name__}")
# Cast the data to a different type (e.g., String)
casted_data = cast_to_detected_type(data, String, typeset)
casted_type = detect_type(casted_data, typeset)
print(f"Casted data type: {casted_type.__class__.__name__}")
print(f"Casted data content: {casted_data.to_list()}")
Debug
Known issues
breakingIn `v0.7.0`, the API for defining and interacting with typesets underwent a significant breaking change. Public methods on typesets became static, and a new declarative API was introduced.fixUsers on `v0.6.x` or earlier must refactor typeset construction and method calls to use the new static methods and declarative syntax. Refer to the `v0.7.0` documentation for updated patterns, particularly for custom typesets.
affects: v0.7.0 onwards
gotchaUsers may encounter compatibility issues with specific Python, Pandas, or NumPy versions, especially when using older `visions` versions. For example, `bottleneck` was removed in `v0.7.2` due to Python 3.9+ incompatibility, and `imghdr` was removed in `v0.8.0`.fixEnsure `visions` is installed with the latest compatible versions of Pandas and NumPy. If issues persist, upgrade `visions` to `v0.8.0` or newer, which includes recent compatibility fixes and removes problematic dependencies.
affects: All versions prior to v0.8.0
gotchaWhile `visions` primarily targets Pandas DataFrames, `v0.7.2` introduced explicit support for Numpy and Spark backends. The behavior and available features may differ significantly when operating with different backends, potentially leading to unexpected results if not explicitly managed.fixBe aware of the active backend when working with `visions`. If using Pandas, ensure your data is a Pandas Series/DataFrame. If leveraging Numpy or Spark backends, consult the documentation for their specific integration patterns and limitations as they may require different type definitions or usage.
affects: v0.7.2 onwards
Upgrade
Version history
0.8.2latest on PyPI · released May 26, 2026
Audit
Dependencies
No dependency data recorded yet.