LogoLogo
AboutBlogLaunch app ↗
v0.22.x
v0.22.x
  • Get Started
  • Overview
  • Getting Access to Distributional
  • Install the Python SDK
  • Quickstart
  • Learning about Distributional
    • Distributional Concepts
    • Why We Test Data Distributions
    • The Flow of Data
  • Using Distributional
    • Projects
    • Runs
      • Reporting Runs
      • Setting a Baseline Run
    • Metrics
    • Tests
      • Creating Tests
        • Using Filters in Tests
        • Available Statistics and Assertions
      • Running Tests
      • Reviewing Tests
        • What Is a Similarity Index?
    • Notifications
    • Access Controls
      • Organization and Namespaces
      • Users and Permissions
      • Tokens
  • Platform
    • Sandbox
    • Self-hosted
      • Architecture
      • Deployment
        • Helm Chart
        • Terraform Module
      • Networking
      • OIDC Authentication
      • Data Security
  • Reference
    • Query Language
      • Functions
    • Python SDK
      • dbnl
      • dbnl.util
      • dbnl.experimental
      • Classes
      • Eval Module
        • Quick Start
        • dbnl.eval
        • dbnl.eval.metrics
        • Application Metric Sets
        • How-To / FAQ
        • LLM-as-judge and Embedding Metrics
        • RAG / Question Answer Example
    • CLI
  • Versions
    • Release Notes
Powered by GitBook

© 2025 Distributional, Inc. All Rights Reserved.

On this page
  • get_column_schemas_from_dataframe
  • get_default_components_dag_from_column_schemas
  • get_run_config_column_schemas_from_dataframe
  • get_run_config_scalar_schemas_from_dataframe
  • get_run_schema_columns_from_dataframe
  • get_run_schema_scalars_from_dataframe
  • get_scalar_schemas_from_dataframe
  • make_test_session_input

Was this helpful?

Export as PDF
  1. Reference
  2. Python SDK

dbnl.util

get_column_schemas_from_dataframe

dbnl.util.get_column_schemas_from_dataframe(df: DataFrame) → list[RunSchemaColumnSchemaDict]

get_default_components_dag_from_column_schemas

dbnl.util.get_default_components_dag_from_column_schemas(column_schemas: Sequence[ColumnSchemaDict]) → dict[str, list[str]] | None

Gets the unconnected components DAG from a list of column schemas. If there are no components, returns None. The default components dag is of the form {

“component1”: [], “component2”: [], …}

  • Parameters:column_schemas – list of column schemas

  • Returns: dictionary of components DAG or None

get_run_config_column_schemas_from_dataframe

dbnl.util.get_run_config_column_schemas_from_dataframe(df: DataFrame) → list[RunConfigPrimitiveColumnSchemaDict | RunConfigContainerColumnSchemaDict]

get_run_config_scalar_schemas_from_dataframe

dbnl.util.get_run_config_scalar_schemas_from_dataframe(df: DataFrame) → list[RunConfigPrimitiveScalarSchemaDict | RunConfigContainerScalarSchemaDict]

get_run_schema_columns_from_dataframe

dbnl.util.get_run_schema_columns_from_dataframe(df: DataFrame) → list[RunSchemaColumnSchema]

get_run_schema_scalars_from_dataframe

dbnl.util.get_run_schema_scalars_from_dataframe(df: DataFrame) → list[RunSchemaScalarSchema]

get_scalar_schemas_from_dataframe

dbnl.util.get_scalar_schemas_from_dataframe(df: DataFrame) → list[RunSchemaScalarSchemaDict]

make_test_session_input

dbnl.util.make_test_session_input(*, run: Run | None = None, run_query: RunQuery | None = None, run_alias: str = 'EXPERIMENT') → TestSessionInput

Create a TestSessionInput object from a Run or a RunQuery. Useful for creating TestSessions right after closing a Run.

  • Parameters:

    • run – The Run to create the TestSessionInput from

    • run_query – The RunQuery to create the TestSessionInput from

    • run_alias – Alias for the Run, must be ‘EXPERIMENT’ or ‘BASELINE’, defaults to “EXPERIMENT”

  • Raises:DBNLInputValidationError – If both run and run_query are None

  • Returns: TestSessionInput object

PreviousdbnlNextdbnl.experimental

Was this helpful?