Skip to content

Commit 8a2a2a5

Browse files
committed
Wording edits from feedback
1 parent 9be62ec commit 8a2a2a5

File tree

2 files changed

+23
-26
lines changed

2 files changed

+23
-26
lines changed

articles/cosmos-db/cosmosdb-jupyter-notebooks.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,39 +24,36 @@ Azure Cosmos DB supports both C# and Python notebooks for all APIs, including Co
2424

2525
Jupyter notebooks were originally developed for data science applications written in Python and R. However, they can be used in various ways for different kinds of projects, including:
2626

27-
* ***Data visualization:** Jupyter notebooks allow you to visualize data in the form of a shared notebook that renders a data set as a graphic. You can create visualizations, make interactive changes to the shared code and data set, and share the results.
27+
**Data visualization:** Jupyter notebooks allow you to visualize data in the form of a shared notebook that renders a data set as a graphic. You can create visualizations, make interactive changes to the shared code and data set, and share the results.
2828

29-
* **Code sharing:** Services like GitHub provide ways to share code, but they're largely non-interactive. With a Jupyter notebook, you can view code, execute it, and display the results directly in the Azure portal.
29+
**Code sharing:** Services like GitHub provide ways to share code, but they're largely non-interactive. With a Jupyter notebook, you can view code, execute it, and display the results directly in the Azure portal.
3030

31-
* **Live interactions with code:** Code in a Jupyter notebook is dynamic; it can be edited and rerun incrementally in real time. You can also embed user controls (for example, sliders or text input fields) that can be used as input sources for code, demos, or Proof of Concepts (POCs).
31+
**Live interactions with code:** Code in a Jupyter notebook is dynamic; you can edit it and run the updates incrementally in real time. You can also embed user controls (for example, sliders or text input fields) that are used as input sources for code, demos, or Proof of Concepts (POCs).
3232

33-
* **Documentation of code samples and outcomes of data exploration:** If you have a piece of code and you want to explain line-by-line how it works, you can embed it in a Jupyter Notebook. You can add interactivity along with the documentation at the same time.
33+
**Documentation of code samples and outcomes of data exploration:** If you have a piece of code and you want to explain line-by-line how it works, you can embed it in a Jupyter Notebook. You can add interactivity along with the documentation at the same time.
3434

35-
* **Built-in commands for Azure Cosmos DB:** Azure Cosmos DB's built-in magic commands make it easy to interact with your account. You can use commands like %%upload and %%sql to upload data into a container and query it using [SQL API syntax](sql-query-getting-started.md), no custom code required.
35+
**Built-in commands for Azure Cosmos DB:** Azure Cosmos DB's built-in magic commands make it easy to interact with your account. You can use commands like %%upload and %%sql to upload data into a container and query it using [SQL API syntax](sql-query-getting-started.md). You don't need to write additional custom code.
3636

37-
* **All in one place environment:** Jupyter notebooks combine code, rich text, images, videos, animations, mathematical equations, plots, maps, interactive figures, widgets, and graphical user interfaces into a single document.
37+
**All in one place environment:** Jupyter notebooks combine code, rich text, images, videos, animations, mathematical equations, plots, maps, interactive figures, widgets, and graphical user interfaces into a single document.
3838

3939
## Components of a Jupyter notebook
4040

4141
Jupyter notebooks can include several types of components, each organized into discrete blocks or cells:
4242

43-
* **Text and HTML:** Plain text, or text annotated in the markdown syntax to generate HTML, can be inserted into the document at any point. CSS styling can also be included inline or added to the template used to generate the notebook.
43+
**Text and HTML:** Plain text, or text annotated in the markdown syntax to generate HTML, can be inserted into the document at any point. CSS styling can also be included inline or added to the template used to generate the notebook.
4444

45-
* **Code and output:** Jupyter notebooks support Python and C# code. The results of the executed code appear immediately after the code blocks, and the code blocks can be executed multiple times in any order you like.
45+
**Code and output:** Jupyter notebooks support Python and C# code. The results of the executed code appear immediately after the code blocks, and the code blocks can be executed multiple times in any order you like.
4646

47-
* **Visualizations:** Graphics and charts can be generated from the code, using modules like Matplotlib, Plotly, Bokeh, and others. Similar to the output, these visualizations appear inline next to the code that generates them.
47+
**Visualizations:** You can generate graphics and charts from the code by using modules like Matplotlib, Plotly, Bokeh, and others. Similar to the output, these visualizations appear inline next to the code that generates them. Similar to the output, these visualizations appear inline next to the code that generates them.
4848

49-
* **Multimedia:** Because Jupyter notebook is built on the web technology, it can display all the types of multimedia supported in a web page. You can include them in a notebook as HTML elements, or you can generate them programmatically by using the `IPython.display` module.
49+
**Multimedia:** Because Jupyter notebooks are built on web technology, they can display all the types of multimedia supported by a web page. You can include them in a notebook as HTML elements, or you can generate them programmatically by using the `IPython.display` module.
5050

51-
* **Data:** Data from Azure Cosmos containers and results of queries can be imported into a Jupyter notebook programmatically. For example, you can use built-in commands to upload or query data in Azure Cosmos DB.
51+
**Data:** You can import the data from Azure Cosmos containers or the results of queries into a Jupyter notebook programmatically. Use built-in magic commands to upload or query data in Azure Cosmos DB.
5252

5353
## Next steps
5454

5555
To get started with built-in Jupyter notebooks in Azure Cosmos DB, see the following articles:
5656

5757
* [Enable notebooks in an Azure Cosmos account](enable-notebooks.md)
5858
* [Use Python notebook features and commands](use-python-notebook-features-and-commands.md)
59-
* [Use C# notebook features and commands](use-csharp-notebook-features-and-commands.md)
60-
61-
62-
59+
* [Use C# notebook features and commands](use-csharp-notebook-features-and-commands.md)

articles/cosmos-db/use-csharp-notebook-features-and commands.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ In a new code cell, insert and run the following code, replacing ``PackageToBeIn
2323
```
2424
You can install multiple NuGet packages in the same cell. Packages will be available to use from any notebook in the Azure Cosmos account workspace.
2525

26-
Currently, the C# notebooks workspace does not support recursive resolution of NuGet packages. If a NuGet package has dependencies on other NuGet packages not currently installed, you may have to explicitly reference them along with the parent package.
26+
Currently, the C# notebooks workspace does not support recursive resolution of NuGet packages. If a NuGet package has dependencies on other NuGet packages that are not currently installed, you have to explicitly reference them along with the parent package.
2727

2828
> [!TIP]
29-
> If your notebook requires a custom package, we recommend that you add a cell to your notebook to install the package and make it the first cell. This reduces the chance of conflicts with any packages Azure Cosmos DB loads by default. It also makes it easy to re-install them if you [reset the workspace](#reset-notebooks-workspace), which removes all packages.
29+
> If your notebook requires a custom package, we recommend that you add a cell to your notebook to install the package and make it the first cell. This reduces the chance of conflicts with other packages that Azure Cosmos DB loads by default. It is also easy to re-install the packages if you [reset the workspace](#reset-notebooks-workspace), which removes all packages.
3030
3131
## Use the built-in Azure Cosmos DB .NET SDK
3232
Version 3 of the [Azure Cosmos DB .NET SDK for SQL API](https://github.com/Azure/azure-cosmos-dotnet-v3) is installed and included in the notebook environment for the Azure Cosmos account.
@@ -48,19 +48,19 @@ CosmosClient cosmosClient = new CosmosClient(Cosmos.Endpoint, Cosmos.Key);
4848
Database database = await cosmosClient.CreateDatabaseIfNotExistsAsync("DatabaseName");
4949
Container container = await database.CreateContainerIfNotExistsAsync("ContainerName", "/partitionKey", 400);
5050
```
51-
See [.NET SDK samples](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/master/Microsoft.Azure.Cosmos.Samples/Usage).
51+
To learn more, see the [.NET V3 SDK samples](https://github.com/Azure/azure-cosmos-dotnet-v3/tree/master/Microsoft.Azure.Cosmos.Samples/Usage).
5252

5353
> [!IMPORTANT]
5454
> The built-in Azure Cosmos DB .NET SDK is only supported for SQL (Core) API accounts. For other APIs, you will need to [install the relevant .NET driver](#install-a-new-nuget-package) that corresponds to the API.
5555
5656
## Set custom options using ```CosmosClientOptions```
57-
For more flexibility, you can set custom ``CosmosClientOptions`` to pass in your ``CosmosClient`` instance. You can use this to:
57+
For more flexibility, you can set the custom ``CosmosClientOptions`` property and pass it in your ``CosmosClient`` instance. You can use this property to:
5858

59-
- Set an application name in the user-agent suffix to include in every request
60-
- Set the preferred region to be used to operations against the service
61-
- Set a custom retry policy on rate-limited requests
59+
- Set an application name in the user-agent suffix to include it in every request.
60+
- Set the preferred region to be used when running operations against the service.
61+
- Set a custom retry policy to handle rate-limited requests.
6262

63-
See the [documentation](/dotnet/api/microsoft.azure.cosmos.cosmosclientoptions) for all ``CosmosClientOptions`` settings.
63+
See the [CosmosClientOptions API reference](/dotnet/api/microsoft.azure.cosmos.cosmosclientoptions) article for all the supported settings. The following is an example that shows how to set `cosmosClientOptions` property:
6464

6565
```csharp
6666
using Microsoft.Azure.Cosmos;
@@ -77,7 +77,7 @@ var client = new CosmosClient(Cosmos.Endpoint, Cosmos.Key, cosmosClientOptions);
7777
```
7878

7979
## Access the account endpoint and primary key variables
80-
You can access the built-in endpoint and key of the account your notebook is in.
80+
You can access the built-in endpoint and key of the Azure Cosmos account where your notebook exists.
8181

8282
```csharp
8383
var key = Cosmos.Key;
@@ -105,9 +105,9 @@ for (int i = 0; i < 5; i++) {
105105
> Console.WriteLine() syntax is not currently supported in C# notebooks. Use Display.AsMarkdown to print console output from your program.
106106
107107
## Use built-in nteract data explorer
108-
You can use the built-in [nteract data explorer](https://blog.nteract.io/designing-the-nteract-data-explorer-f4476d53f897) to filter and visualize a collection of items. In a cell, put the variable you want to visualize in the last line, which will automatically be displayed in nteract when the cell is run.
108+
You can use the built-in [nteract data explorer](https://blog.nteract.io/designing-the-nteract-data-explorer-f4476d53f897) to filter and visualize a collection of items. In a cell, put the variable you want to visualize in the last line, which is automatically displayed in nteract when you run the cell.
109109

110-
For example, in the GetingStarted_Csharp.ipynb example, we can print out the variable with our result, the ``telemetryEvents``. See the [GettingStarted_Csharp.ipynb notebook](https://github.com/Azure-Samples/cosmos-notebooks/blob/master/CSharp_quickstarts/GettingStarted_CSharp.ipynb) for the entire sample.
110+
For example, in the *GetingStarted_Csharp.ipynb* example, we can print out the variable with our result, the ``telemetryEvents``. See the [GettingStarted_Csharp.ipynb notebook](https://github.com/Azure-Samples/cosmos-notebooks/blob/master/CSharp_quickstarts/GettingStarted_CSharp.ipynb) for the entire sample.
111111

112112
![Csharp query cell](media/use-notebook-features-and-commands/csharp-query-cell.png)
113113

0 commit comments

Comments
 (0)