Install & Compatibility
Where this runs
tested against v1.6.4 · 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
py 3.12
✕ build_error
8/12 runs
py 3.13
✕ build_error
✕ build_error
585MB installed
● package 585MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
DatasetProfileView
✓ from whylogs import DatasetProfileView
✗ from whylogs import get_or_create_session
ResultSet
✓ from whylogs import ResultSet
log
✓ from whylogs import log
This quickstart demonstrates how to initialize a whylogs session, log a Pandas DataFrame to create a data profile, and then view the summary statistics.
import pandas as pd
from whylogs import get_or_create_session
# Create a sample DataFrame
data = {
'col_a': [1, 2, 3, 4, 5],
'col_b': ['apple', 'banana', 'cherry', 'apple', 'date']
}
df = pd.DataFrame(data)
# Get or create a whylogs session
session = get_or_create_session()
# Log the DataFrame to generate a profile
with session.logger(dataset_name="my_first_dataset") as logger:
logger.log_dataframe(df)
# Get the generated profile (ResultSet)
results = logger.profile()
# You can also use the direct API for convenience (e.g., if not using a logger for multiple logs)
# import whylogs as why
# results_direct = why.log(df)
print(results.view().to_pandas())
Debug
Known issues
breakingwhylogs v1 introduced significant breaking changes from v0.x, including API alterations and potential incompatibility with profiles generated by older versions. Users migrating from v0.x should consult the migration guide.fixReview the official whylogs v1 Migration Guide and update your code and profile loading logic accordingly. Re-profile data where necessary.
affects: <1.0
gotchaCore visualization tools (`ProfileVisualizer`, `profile_viewer`) and PySpark integration require extra installations (`whylogs[viz]` and `whylogs[spark]`, respectively). A base `pip install whylogs` will not include these functionalities.fixInstall the necessary extras: `pip install "whylogs[viz]"` for visualization or `pip install "whylogs[spark]"` for PySpark integration.
affects: >=1.0
deprecatedThe hosted WhyLabs Platform, used for advanced monitoring and observability of whylogs profiles, is being discontinued. While the whylogs library remains open source and the WhyLabs platform's source code is publicly available for self-hosting, the managed SaaS offering is no longer accessible.fixIf you rely on the WhyLabs Platform for monitoring, consider self-hosting the open-sourced WhyLabs platform or integrating whylogs profiles with an alternative monitoring solution.
affects: All versions that integrate with WhyLabs SaaS
breakingwhylogs version 1.1.2 was yanked from PyPI due to a bug that prevented it from correctly reading dataset profiles written with previous versions.fixAvoid installing or using whylogs version 1.1.2. Upgrade to a later stable version (e.g., 1.1.3 or higher) or downgrade to an earlier stable version.
affects: 1.1.2
Upgrade
Version history
1.6.4latest on PyPI · released Dec 3, 2024
Audit
Dependencies
pandasrequiredCommonly used for data input (DataFrames) to whylogs.
pysparkoptionalRequired for Spark integration, installed via 'whylogs[spark]'.
matplotliboptionalOften used for profile visualization, included with 'whylogs[viz]'.