Constructs a DatasetInfo object from a pandas DataFrame.

Input Parameters

Type

Default

Description

df

Union [pd.Dataframe, list]

Either a single pandas DataFrame or a list of DataFrames. If a list is given, all dataframes must have the same columns.

display_name

str

' '

A display_name for the dataset

max_inferred_cardinality

Optional [int]

None

If specified, any string column containing fewer than max_inferred_cardinality unique values will be converted to a categorical data type.

dataset_id

Optional [str]

None

The unique identifier for the dataset

import pandas as pd

df = pd.read_csv('example_dataset.csv')

dataset_info = fdl.DatasetInfo.from_dataframe(
    df=df
)

Return Type

Description

fdl.DatasetInfo

A fdl.DatasetInfo() object constructed from the pandas Dataframe provided.