Skip to content

Data

update_schema_to_dataframe(rapid, metadata, df)

Updates a schema for a specified dataset in the API to match the given Dataframe.

Parameters:

Name Type Description Default
rapid Rapid

An instance of the rAPId SDK's main class.

required
metadata SchemaMetadata

The metadata for the schema to be updated and the dataset the DataFrame belongs to.

required
df Dataframe

The dataframe that the schema should be updated to match.

required

upload_and_create_dataset(rapid, metadata, df, upgrade_schema_on_fail=False)

Uploads a dataframe to a dataset in the API, creating schema first if necessary.

Parameters:

Name Type Description Default
rapid Rapid

An instance of the rAPId SDK's main class.

required
metadata SchemaMetadata

The metadata for the schema to be created and the dataset to upload the DataFrame to.ß

required
df DataFrame

The pandas DataFrame to generate a schema for and upload to the dataset.

required
upgrade_schema_on_fail bool

Whether to upgrade the schema if the DataFrame's schema is incorrect. Defaults to False.

False

Raises:

Type Description
DataFrameUploadValidationException

If the DataFrame's schema is incorrect and upgrade_schema_on_fail is False.