client.upload_dataset

Uploads a dataset from a pandas DataFrame.

Input ParametersTypeDefaultDescription
project_idstrNoneThe unique identifier for the project.
datasetdictNoneA dictionary mapping dataset slice names to pandas DataFrames.
dataset_idstrNoneA unique identifier for the dataset. Must be a lowercase string between 2-30 characters containing only alphanumeric characters and underscores. Additionally, it must not start with a numeric character.
infoOptional [fdl.DatasetInfo]NoneThe Fiddler fdl.DatasetInfo() object used to describe the dataset.
size_check_enabledOptional [bool]TrueIf True, will issue a warning when a dataset has a large number of rows.
import pandas as pd

PROJECT_ID = 'example_project'
DATASET_ID = 'example_dataset'

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

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

client.upload_dataset(
    project_id=PROJECT_ID,
    dataset_id=DATASET_ID,
    dataset={
        'baseline': df
    },
    info=dataset_info
)
Return TypeDescription
dictA dictionary containing information about the uploaded dataset.
{
  'row_count': 10000,
  'col_count': 20,
  'log': [
    'Importing dataset example_dataset',
    'Creating table for example_dataset',
    'Importing data file: baseline.csv'
  ]
}