Featuresmith Icon
Featuresmith
  • Docs
  • SDK
  • CLI
  • Examples
  • Roadmap
v0.4.0
Documentation

Getting Started

  • Introduction
  • Installation
  • Quick Start
  • Tutorial Notebooks
  • Benchmarks
  • Development Setup
  • Contributing

Core Concepts

  • Architecture Overview
  • Dataset Layer
  • Connectors
  • Profiling Engine
  • Rule Engine
  • Dataset Review Engine
  • ML Readiness Score
  • Target Leakage Detection
  • Dataset Diff Engine
  • Target Column Concept
  • Mental Model & Workflow
  • Interpreting Findings
  • Workflow Cheat Sheet
  • Beginner Glossary

Python SDK

  • load()
  • profile()
  • analyze()
  • review()
  • diff()
  • score()
  • plan()
  • Dataset
  • Data Models
  • Profile Models
  • Rule & Finding Models
  • Review Models
  • Score Models
  • Leakage Models
  • Diff Models
  • Exceptions
  • Plugins

CLI Reference

  • analyze
  • review
  • diff
  • score
  • plan
  • Configuration

Guides

  • CI/CD Integration
  • Custom Rules
  • Writing Plugins

Resources

  • Release Notes
  • FAQ
  • Troubleshooting
DocsGuide

Getting Started

  • Introduction
  • Installation
  • Quick Start
  • Tutorial Notebooks
  • Benchmarks
  • Development Setup
  • Contributing

Core Concepts

  • Architecture Overview
  • Dataset Layer
  • Connectors
  • Profiling Engine
  • Rule Engine
  • Dataset Review Engine
  • ML Readiness Score
  • Target Leakage Detection
  • Dataset Diff Engine
  • Target Column Concept
  • Mental Model & Workflow
  • Interpreting Findings
  • Workflow Cheat Sheet
  • Beginner Glossary

Python SDK

  • load()
  • profile()
  • analyze()
  • review()
  • diff()
  • score()
  • plan()
  • Dataset
  • Data Models
  • Profile Models
  • Rule & Finding Models
  • Review Models
  • Score Models
  • Leakage Models
  • Diff Models
  • Exceptions
  • Plugins

CLI Reference

  • analyze
  • review
  • diff
  • score
  • plan
  • Configuration

Guides

  • CI/CD Integration
  • Custom Rules
  • Writing Plugins

Resources

  • Release Notes
  • FAQ
  • Troubleshooting
HomeDocsProfile Models

Python SDK

Profile Models

SDK Reference: profiling result objects

fs.profile() returns a single frozen ProfileResult. All nested models below live in featuresmith.core.profile_result and are re-exported as values on the result, so they are reached via attribute access rather than imports.

ProfileResult

python
1@dataclass(frozen=True, slots=True)
2class ProfileResult:
3 dataset_summary: DatasetSummary
4 column_profiles: Mapping[str, ColumnProfile]
5 numeric_profiles: Mapping[str, NumericProfile]
6 categorical_profiles: Mapping[str, CategoricalProfile]
7 datetime_profiles: Mapping[str, DatetimeProfile]
8 text_profiles: Mapping[str, TextProfile]
9 missing_value_summary: MissingValueSummary
10 duplicate_summary: DuplicateSummary
11 correlation_summary: CorrelationSummary
12 dataset_metadata: DatasetMetadata
13 execution_metadata: ExecutionMetadata
14
15 def to_dict(self) -> dict[str, Any]: ...

The typed profile mappings are keyed by column name and only contain columns of the matching logical_type.

DatasetSummary

High-level dataset statistics.

python
1@dataclass(frozen=True, slots=True)
2class DatasetSummary:
3 row_count: int
4 column_count: int
5 size_in_bytes: int | None
6 missing_percentage: float
7 duplicate_percentage: float
8 num_numeric_columns: int
9 num_categorical_columns: int
10 num_datetime_columns: int
11 num_text_columns: int
12 num_constant_columns: int
13 num_fully_empty_columns: int

ColumnProfile

General profile summary present for every column in the dataset.

python
1@dataclass(frozen=True, slots=True)
2class ColumnProfile:
3 name: str
4 dtype: str
5 logical_type: str # "numeric" | "categorical" | "datetime" | "text"
6 missing_count: int
7 missing_percentage: float
8 is_constant: bool
9 is_fully_empty: bool

NumericProfile

Detailed statistics for a numeric column.

python
1@dataclass(frozen=True, slots=True)
2class NumericProfile:
3 column_name: str
4 count: int
5 missing_count: int
6 missing_percentage: float
7 unique_count: int
8 mean: float | None
9 median: float | None
10 mode: float | None
11 minimum: float | None
12 maximum: float | None
13 range: float | None
14 variance: float | None
15 std_dev: float | None
16 q1: float | None
17 q2: float | None
18 q3: float | None
19 iqr: float | None
20 sum: float | None
21 zero_count: int
22 negative_count: int
23 positive_count: int
24 skewness: float | None
25 kurtosis: float | None

CategoricalProfile

Detailed statistics for a categorical column. The frequency_table is capped by the max_frequency_table_size profiling option (default 1000).

python
1@dataclass(frozen=True, slots=True)
2class CategoricalProfile:
3 column_name: str
4 cardinality: int
5 unique_count: int
6 missing_count: int
7 frequency_table: Mapping[str, int]
8 top_values: Sequence[tuple[str, int]]
9 least_frequent_values: Sequence[tuple[str, int]]
10 most_common_category: str | None
11 entropy: float | None # Shannon entropy, base 2

DatetimeProfile

python
1@dataclass(frozen=True, slots=True)
2class DatetimeProfile:
3 column_name: str
4 minimum: str | None # ISO 8601
5 maximum: str | None # ISO 8601
6 range_days: float | None
7 missing_count: int
8 earliest_record: str | None
9 latest_record: str | None

TextProfile

python
1@dataclass(frozen=True, slots=True)
2class TextProfile:
3 column_name: str
4 avg_length: float | None
5 min_length: int | None
6 max_length: int | None
7 empty_strings: int
8 whitespace_only: int
9 char_count: int
10 word_count: int

Aggregate Summaries

python
1@dataclass(frozen=True, slots=True)
2class MissingValueSummary:
3 column_missing_counts: Mapping[str, int]
4 column_missing_percentages: Mapping[str, float]
5 total_missing: int
6 dataset_missing_percentage: float
7
8
9@dataclass(frozen=True, slots=True)
10class DuplicateSummary:
11 duplicate_rows_count: int
12 duplicate_percentage: float
13 constant_columns: Sequence[str]
14 fully_empty_columns: Sequence[str]
15
16
17@dataclass(frozen=True, slots=True)
18class CorrelationSummary:
19 pearson: Mapping[str, Mapping[str, float | None]]
20 spearman: Mapping[str, Mapping[str, float | None]] # reserved
21 kendall: Mapping[str, Mapping[str, float | None]] # reserved

pearson maps column A to column B to the correlation coefficient (or None when undefined). spearman and kendall are reserved and currently empty.

Metadata Records

python
1@dataclass(frozen=True, slots=True)
2class DatasetMetadata:
3 source: str | None
4 file_size: int | None
5 backend: str # "pandas" | "polars"
6 custom_metadata: Mapping[str, Any]
7
8
9@dataclass(frozen=True, slots=True)
10class ExecutionMetadata:
11 start_time: str # ISO 8601
12 duration_seconds: float
13 featuresmith_version: str

Example

python
1import featuresmith as fs
2
3profile = fs.profile("customers.csv")
4
5print(profile.dataset_summary.row_count)
6print(profile.numeric_profiles["age"].mean)
7print(profile.categorical_profiles["city"].most_common_category)
8print(profile.missing_value_summary.dataset_missing_percentage)

Explore

  • Quick Start
  • Python SDK
  • CLI Reference
  • Examples
Featuresmith Icon
Featuresmith

Open-source data profiling and validation for Python engineers.

Documentation

  • Introduction
  • Quick Start
  • Python SDK
  • CLI Reference

Community

  • GitHub
  • Discussions
  • Issues
  • Contributing

Project

  • Roadmap
  • Release status
  • Benchmarks
  • Changelog
  • Examples

Legal

  • Apache 2.0 License
  • Code of Conduct
  • Security

© 2026 Featuresmith Contributors. Released under the Apache 2.0 License.

Built by Aditya Gangwani in the open.