upload_dataframe_to_dataset#
- nominal.thirdparty.pandas.upload_dataframe_to_dataset(dataset, df, timestamp_column, timestamp_type, *, wait_until_complete=True, file_name=None, tag_columns=None, tags=None)#
Upload a pandas dataframe to an existing dataset as if it were a gzipped-CSV file
- Parameters:
dataset (Dataset)
Dataset to upload the dataframe to
df (DataFrame)
Dataframe to upload to the dataset
timestamp_column (str)
Column containing timestamps to use for their respective rows
timestamp_type (Iso8601 | Epoch | Relative | Custom | Literal['iso_8601', 'epoch_picoseconds', 'epoch_nanoseconds', 'epoch_microseconds', 'epoch_milliseconds', 'epoch_seconds', 'epoch_minutes', 'epoch_hours', 'epoch_days'])
Type of timestamp, e.g., epoch_seconds, iso8601, etc.
wait_until_complete (bool)
If true, block until data has been ingested
file_name (str | None)
Upload filename for the generated CSV. An existing extension is preserved; otherwise .csv.gz is appended. If not provided, defaults to using the dataset’s name
tag_columns (Mapping[str, str] | None)
Mapping of column names => tag keys to use for their respective rows.
tags (Mapping[str, str] | None)
Mapping of key-value pairs to apply uniformly as tags to all data within the dataframe.
- Return type: