

Raise Exception("You must provide a name and key for an Azure Storage account") If azure_storage_account_name is None or azure_storage_account_key is None: Os.remove(os.path.join(dirname, mydatafile)) Mydata = pd.read_csv(mydatafile, header = 0) In a new code block create your connection and query stringsįrom import BlobServiceīlob_service = BlobService(account_name=blob_account_name,īlob_service.get_blob_to_path(mycontainer, myblobname, mydatafile) By default, the data in your account is available only to you, the account owner. All objects in a storage account are billed together as a group. The Azure storage account provides a unique namespace to store and access your Azure Storage data objects. Mydatafile = "" # fill in the output file name

Mycontainer = "" # fill in the container name So Code Block is where we define the connectionīlob_account_name = "" # fill in your blob account nameīlob_account_key = "" # fill in your blob account key Within your Jupyter Notebook you now need to define the connection parameters, So in a code block create the following and take the details from your Azure Account. This code will create a container and blob in the azure storage you provide. Once you retrieve your account and key, you can enter them below. Or by using the Python Azure SDK as shown in the example below. Read theĬreate a storage account using the Azure SDK Section a shared access signature for read-only access is created.īefore we can do anything though, we need an Azure Storage Account. The below code shows using private keys first. It also makes it pretty straightforward to keep our data private or public. We can also use Azure Storage to store our data. Then, if we wanted to do something with it, we might choose to load it into pandas.ĭataframe = pandas.read_csv('oil_price.csv') In this way we can just curl a file down from the internet, like this csv about oil prices. We can call bash commands by starting our line with a Package to access a variety of data all while working from a Jupyter Notebook.

There are many ways to get your data in your notebooks ranging from using curl or leveraging the Jupyter provides the basis of the Azure Notebooks user experience.
