comfortgaq.blogg.se

Jupyter notebook tutorial
Jupyter notebook tutorial











jupyter notebook tutorial

var dictionary = new Dictionary() ĭictionary.TryAdd (result.Item, result.Price) In the code cell, create a dictionary by adding unique permutations of the Item field as the key and the data in the Price field as the value.

jupyter notebook tutorial

Query: "SELECT c.Action, c.Price, c.Country, c.Item FROM c"įeedIterator feed = container.GetItemQueryIterator(įeedResponse response = await feed.ReadNextAsync() In the code cell, add code to execute a SQL query using the SDK storing the output of the query in a variable of type List named results. In the code cell, create a new C# class to represent an item in the container. In the output, select the Line Chart option to view a different visualization of the data. In the code cell, import the pandas package to customize the output of the dataframe. Observe the output of running the command. In the code cell, output the top 10 items from the dataframe. SELECT c.Action, c.Price as ItemRevenue, c.Country, c.Item FROM c %%sql -database RetailIngest -container WebsiteMetrics -output df_cosmos In the code cell, use a SQL query to populate a Pandas DataFrame. Select Run Active Cell to only run the command in this specific cell. Within the code cell, add the following magic command to upload, to your existing container, the JSON data from this url: %%upload -databaseName RetailIngest -containerName WebsiteMetrics -url Container container = await database.CreateContainerIfNotExistsAsync("WebsiteMetrics", "/CartID")

jupyter notebook tutorial

Database database = await cosmosClient.CreateDatabaseIfNotExistsAsync("RetailIngest") Ĭreate a container named WebsiteMetrics with a partition key of /CartID. var cosmosClient = new CosmosClient(Cosmos.Endpoint, Cosmos.Key) Ĭreate a database named RetailIngest. using Ĭreate a new instance of the client type using the built-in SDK. Import any packages you require for this tutorial. Select Run to create the database and container resource. container = database.create_container_if_not_exists(id='WebsiteMetrics', partition_key=PartitionKey(path='/CartID')) database = cosmos_client.create_database_if_not_exists('RetailIngest')Ĭreate a container named WebsiteMetrics with a partition key of /CartID. import smosįrom _key import PartitionKeyĬreate a database named RetailIngest using the built-in SDK.













Jupyter notebook tutorial