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
HomeDocsfs.load()

Python SDK

fs.load()

SDK Reference: tabular ingestion

python
1def load(source: object) -> Dataset:

Load a supported local tabular file or in-memory DataFrame into a normalized immutable Dataset descriptor.

When to Use It

Use at the start of any data validation script or pipeline step to parse files or wrap DataFrames into a standard Dataset object containing inferred schemas, column data types, row counts, and source metadata.

Arguments

  • source: str | pandas.DataFrame | polars.DataFrame. Local file path (.csv, .xlsx, .xls, .parquet) or loaded DataFrame object.

Return Value

Returns a normalized, shallowly immutable Dataset dataclass containing dataframe, backend ("polars" or "pandas"), schema (DatasetSchema), row_count, column_count, dtypes, source, and file_size.

Exceptions

  • ConnectorError: Base exception raised when a data source cannot be validated or loaded.
  • SourceNotFoundError: Raised when the target local file path does not exist.
  • UnsupportedFormatError: Raised when the file extension or object type is unsupported.
  • SourceParseError: Raised when parsing or reading the file content fails.

Example

python
1import featuresmith as fs
2import polars as pl
3
4# Load from local file path (CSV, Parquet, Excel)
5ds = fs.load("train.parquet")
6print(f"Loaded {ds.row_count} rows across {ds.column_count} columns via {ds.backend}.")
7
8# Load from in-memory Polars or pandas DataFrame
9df = pl.DataFrame({"x": [1, 2, 3], "y": [4.0, 5.0, 6.0]})
10ds_mem = fs.load(df)
11print(ds_mem.preview(2))

Notes and Limitations

  • Zero Data Copying: In-memory pandas or Polars DataFrames are wrapped directly without copying memory buffers.
  • Backend Engines: Polars is used for CSV and Parquet files; pandas is used for Excel files.

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.