twinlab.Dataset.upload#

Dataset.upload(df, verbose=False)[source]#

Upload a dataset to the twinLab cloud so that it can be queried and used for training.

If a dataset has been uploaded previously for this Dataset object, this will require you to re-instantiate the dataset object with a new ID (tl.Dataset(“new_id”)) or delete the existing dataset object (Dataset.delete) before proceeding.

Please note the largest dataset that can be uploaded is currently 5GB.

When using twinLab emulators, note that training time scales cubically with the amount of data included. It may be worthwhile training with a smaller subset of data at first, to determine approximately how long it will take to train. Please get in touch with our experts for technical support to understand how to make best use of data.

Parameters:
  • df (pandas.DataFrame) – A pandas.DataFrame containing the dataset to be uploaded.

  • verbose (bool, optional) – Display information about the operation while running.

Return type:

None

Example

dataset = tl.Dataset("my_dataset")
df = pd.DataFrame({"X": [1, 2, 3, 4], "y": [1, 4, 9, 16]})
dataset.upload(df)