pandas new dataset code example
Example 1: Create a dataset from pandas dataframe
from azureml.core import Workspace, Dataset
local_path = 'data/prepared.csv'
dataframe.to_csv(local_path)
subscription_id = 'xxxxxxxxxxxxxxxxxxxxx'
resource_group = 'xxxxxx'
workspace_name = 'xxxxxxxxxxxxxxxx'
workspace = Workspace(subscription_id, resource_group, workspace_name)
datastore = workspace.get_default_datastore()
datastore.upload(src_dir='data', target_path='data')
dataset = Dataset.Tabular.from_delimited_files(path = [(datastore, ('data/prepared.csv'))])
Example 2: pandas make new dataframe
df = pd.DataFrame({'column1':[1,2,3],'column2':[4,5,6])