pb.datasets.from_file
pb.datasets.from_file(file_path, *, name)
Upload a file from which a dataset will be created.
Parameters:
file_path: str (positional argument)
Relative path of local file to upload.
name: str (keyword-only argument)
Name of dataset to create from uploaded file.
Returns:
Dataset
Examples:
Create a dataset from a local file.
dataset = pb.datasets.from_file("{Path to local file}", name="TLDR News Dataset")
pb.datasets.from_pandas_dataframe
pb.datasets.from_pandas_dataframe(df, *, name)
Upload a Pandas DataFrame from which a dataset will be created.
Parameters:
df: pandas.DataFrame (positional argument)
Reference to Pandas DataFrame to upload.
name: str (keyword-only argument)
Name of dataset to create from uploaded Pandas DataFrame.
Returns:
Dataset
Examples:
Create a dataset from a Pandas DataFrame.
dataset = pb.datasets.from_pandas_dataframe(my_df, name="TLDR News Dataset")