Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created July 19, 2022 03:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IntegerMan/4d837714f478cdf73954973e39300d98 to your computer and use it in GitHub Desktop.
Save IntegerMan/4d837714f478cdf73954973e39300d98 to your computer and use it in GitHub Desktop.
from azureml.core import Dataset
import pandas as pd
# The default datastore is a blob storage container where datasets are stored
datastore = ws.get_default_datastore()
# Load some data into a dataframe (Note: Pandas is just one path into Azure ML)
df = pd.read_csv('my_data.csv')
# Register the dataset
ds = Dataset.Tabular.register_pandas_dataframe(
dataframe=df,
name='DataSet-Name',
description='A description of my dataset',
target=datastore
)
# Display information about the dataset
print(ds.name + " v" + str(ds.version) + ' (ID: ' + ds.id + ")")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment