hi,
I created various datasets but within my python notebook, how do i read it?
So currently if this is what I have:
x_train_df = pd.read_csv('data_reviews/x_train.csv')
what should I replace it with?
hi,
I created various datasets but within my python notebook, how do i read it?
So currently if this is what I have:
x_train_df = pd.read_csv('data_reviews/x_train.csv')
what should I replace it with?
Hi, can you clarify if this is related to Azure ML Notebooks or local Jupyter Notebook? What storage are you trying to read the dataset from?
This is Azure ML Notebooks ( I imported my local jupyter in). The storage is uploaded via dataset, it is in the datastore now in the UI directory.
Hi, thanks for reaching out. I assume you registered a datastore and uploaded datasets to storage. To access the data from storage depends on whether it's structured or unstructured. For unstructured data you can access using FileDataset and for structured data you can access using TabularDataset. The following code snippet shows how to create dataset from datastore. For FileDataset, review Mount vs Download and sample notebook.
from azureml.core import Workspace, Datastore, Dataset
datastore_name = 'your datastore name'
# get existing workspace
workspace = Workspace.from_config()
# retrieve an existing datastore in the workspace by name
datastore = Datastore.get(workspace, datastore_name)
# create a TabularDataset from 3 file paths in datastore
datastore_paths = [(datastore, 'weather/2018/11.csv'),
(datastore, 'weather/2018/12.csv'),
(datastore, 'weather/2019/*.csv')]
weather_ds = Dataset.Tabular.from_delimited_files(path=datastore_paths)
--please don't forget to Accept Answer if the reply is helpful. Thanks.--
10 people are following this question.