Working With the Best Python IDEs.

Angel Mariano
The Startup
Published in
6 min readSep 17, 2020

--

Throughout this article, I will discuss a step-by-step guide for using some of the top Python Integrated Development Environments/Code Editors:
I. Google Colaboratory | II. Jupyter Notebook | III. Spyder.
With a noteworthy guide for the feature of uploading Python code files to your Github account.

I. Google Colaboratory

Colaboratory, or “Colab” for short, is a product from Google Research. Colab allows anybody to write and execute arbitrary python code through the browser, and is especially well suited to machine learning, data analysis and education.

Getting Started:

Go to Google Colab: https://colab.research.google.com/

from

•From here, we can create a New Notebook. In which I named:
“GitColabHW 200916 ATM”

•Hovering over the cell will show the 2 cell type options: Code or Text

•Here, the title ‘Coding with Google Colab’ is formatted as Text, while the python codes were formatted as Code where:

A. I have imported Numpy and Pandas Library.
B. Uploaded a file named ‘DataSeerGrabPrizeData’
C. Checked the details of the dataframe using the function .head()
(c.1) I have also checked other details using .describe()
(c.2) Removed null values using .dropna()
(c.2) Replaced null values using .fillna()

•After coding , downloading the notebook can be either as a python file (.py) or as a Jupyter notebook (.ipynb).

Here, I have downloaded the notebook in .ipynb format.
For the next section, I will try this code using Jupyter Notebook. Also, I will upload this downloaded file from Colab to my Github account in last section of this page, so stay tuned!

II. Jupyter Notebook

The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text. Uses include: data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more

Getting Started:

  • Open Anaconda Navigator, then Launch Jupyter Notebook

With Jupyter Notebook, I can open the same notebook file from Google Colab.

File directory in Jupyter Notebook.

Also, I can create a New Notebook to code:

Here I will run the same set of functions I used in Google Colab, then save it to a new csv file:

(i) Imported the needed Libraries (ii) Read a .csv file (iii) check the details of the dataframe

Using the function .dropna(), I removed the null values in the dataframe then saved it to a csv file.

For the next section, I will also try the same set of functions above using the Spyder IDE!

III. Spyder IDE

Spyder is an open source cross-platform integrated development environment (IDE) for scientific programming in the Python language.

For your additional info’s— I have also tackled the basics of Spyder IDE here: https://medium.com/@angel.mariano/spyder-ide-and-command-line-the-basics-b66aa8277ff8

Getting Started:

  • Open Anaconda Navigator, then Launch Spyder

Here I will run the same set of functions I used in Google Colab and Jupyter Notebook, then also save it to a new csv file:

From the Variable explorer, the contents of the dataframe can be displayed:

After running the code, the new file generated using Spyder can now be seen in my local folder:

GitHub Integration:

GitHub is a code hosting platform for version control and collaboration. It is a website and cloud-based service that helps developers store and manage their code, which lets you and others work together on projects from anywhere.

In this section, we will cover:
. Uploading /Downloading files using
cmd
. Git x
Google Colab: Shortcuts to connect Colab and Github

> Uploading files with the help of command prompt.

For the basics of Command Prompt (Windows Command Line), check this out: https://medium.com/@angel.mariano/spyder-ide-and-command-line-the-basics-b66aa8277ff8

Here, I have created a new repository called “git-and-colab-basics”

Using the command prompt, I have cloned this new repository.

With this, I will try to upload the notebook I have downloaded from Colab to my Github account:

Copied the Colab Notebook file to the same link cloned to github.

Using the functions: git add, git commit -m “rush commit” , and git push -u origin master, I was able to successfully upload the notebook to my github account:

> Downloading files from a repository using cmd.

With GitHub, we can also download/save files from other repositories.

Here, I have forked a repository made by other users, it allows me to have my own copy of the repository online. Moreover, I have also cloned this repository to save the files directly in my local drive:

I have cloned the repository successfully using cmd, and we can verify this using File Explorer with the same file directory:

> Git x Google Colaboratory Shortcuts

Without the use of command prompt, we also the option to save our notebooks directly from Google Colab to our Github account.

The notebook is now posted in my Github account (Created using Colaboratory).

Python is such a powerful programming language, and learning this helps us to be versatile in doing even the most complex algorithms. So, maximize your skills in Python Programming with the help of some of these Python IDEs/Code Editors!

--

--