How to Use Azure Notebooks Hello World

Azure Notebooks are Jupyter notebooks running on Azure, which is great as users don’t need to install any software locally, and it comes with other cool features as well. To access Notebooks, go to https://notebooks.azure.com/ and sign in: You will be prompted to create a user id. Enter one and click Save: You will see below: Let’s click on Create a New Project, called Hello World. Note the option to make this … Continue reading How to Use Azure Notebooks Hello World

Jupyter Notebook Installing and Hello World on Windows

In a previous post, we looked at installing Python on Windows. In this post, we will install Jupyter Notebook running Python 3. To do this, open a command prompt and type: py -m pip install jupyter This will install the packages required for Jupyter: You will see something like below when complete: Now, to run Jupyter, run the command: py -m notebook This will launch a web browser with Jupyter … Continue reading Jupyter Notebook Installing and Hello World on Windows

Python 3 Missing from Jupyter Notebook in Windows

In this post, we will look at what to do if Python 3 is installed in your Windows environment but it is not appearing in your Jupyter Notebook under New. To fix this, open your command prompt and type: py -m pip install ipykernel Then run below: py -m ipykernel install –user Now start Juypter Notebook using the command: py -m jupyter notebook You will then see Python 3 showing … Continue reading Python 3 Missing from Jupyter Notebook in Windows

Using Python to Filter Data in Power Query

In our previous post, we installed and set up Python to use with Power BI and used Python as a data source. Let’s look at how Python can be used to filter data inside Power Query. Let’s filter records where the number of Employees is greater than 5000. We will use the query: [sourcecode language=”Python”] # ‘dataset’ holds the input data for this script import pandas as pd dataset_filtered = dataset.query(‘Employees … Continue reading Using Python to Filter Data in Power Query

Using Python as a Data Source in Power BI

In our previous post, we installed and set up Python for use in Power BI. In this post, we will run a Python script and use that as a datasource in Power BI. In Power BI Desktop, select Get Data, then More: Select Python script and Connect: This will open a Python script. Paste in the code from the previous example. [sourcecode language=”Python”] import pandas as pd data = [[‘Alex’,10],[‘Bob’,12],[‘Clarke’,13]] … Continue reading Using Python as a Data Source in Power BI

Installing and Setting Up Python for Power BI

Python can be used in Power BI in several ways. These include: Creating visualizations using Python Using Python as a data source Scripting in Python to prepare data We will go through examples of each of these in the following posts. In this post, we will look at how to install Python in Power BI. We will then move onto how to use Python in various scenarios in Power BI. … Continue reading Installing and Setting Up Python for Power BI

Running a Simple Bar Chart in Python

In this post, we will look at how to run a simple bar chart in Python. We will use matplotlib. Here’s the code. We will display a chart with x-axis showing “team” data vs y-axis showing “score”: [sourcecode language=”Python”] import matplotlib.pyplot as plt team = (‘A’, ‘B’, ‘C’, ‘D’, ‘E’, ‘F’) score = [9,2,5,4,8,6] plt.bar(team, score) plt.show() [/sourcecode] Let’s run this in Visual Studio Code. Save the code with a … Continue reading Running a Simple Bar Chart in Python

Running Python and Visual Studio Code in Windows

In this post, we will look at how to run Python with Visual Studio Code in Windows. To install Python, go to the Python download page at https://www.python.org/ and click on Downloads: Click Download Python: This will download the file: Check Add Python to PATH and click to Install. Note this also installs IDLE (the IDE), pip (the package installer) and documentation: Note customizing gives us: Click Close once complete: Note … Continue reading Running Python and Visual Studio Code in Windows

Python in Visual Studio

To run Python in Visual Studio, open VS and create a new project. Select Python from the left and select Python application: You will see the project below. Enter a command, for example, Hello Word like below: Press F5: You can also import modules: