Learn practical skills, build real-world projects, and advance your career

Assignment 3 - Pandas Data Analysis Practice

This assignment is a part of the course "Data Analysis with Python: Zero to Pandas"

In this assignment, you'll get to practice some of the concepts and skills covered this tutorial: https://jovian.ml/aakashns/python-pandas-data-analysis

As you go through this notebook, you will find a ??? in certain places. To complete this assignment, you must replace all the ??? with appropriate values, expressions or statements to ensure that the notebook runs properly end-to-end.

Some things to keep in mind:

  • Make sure to run all the code cells, otherwise you may get errors like NameError for undefined variables.
  • Do not change variable names, delete cells or disturb other existing code. It may cause problems during evaluation.
  • In some cases, you may need to add some code cells or new statements before or after the line of code containing the ???.
  • Since you'll be using a temporary online service for code execution, save your work by running jovian.commit at regular intervals.
  • Questions marked (Optional) will not be considered for evaluation, and can be skipped. They are for your learning.

You can make submissions on this page: https://jovian.ml/learn/data-analysis-with-python-zero-to-pandas/assignment/assignment-3-pandas-practice

If you are stuck, you can ask for help on the community forum: https://jovian.ml/forum/t/assignment-3-pandas-practice/11225/3 . You can get help with errors or ask for hints, describe your approach in simple words, link to documentation, but please don't ask for or share the full working answer code on the forum.

How to run the code and save your work

The recommended way to run this notebook is to click the "Run" button at the top of this page, and select "Run on Binder". This will run the notebook on mybinder.org, a free online service for running Jupyter notebooks.

Before staring the assignment, let's save a snapshot of the assignment to your Jovian.ml profile, so that you can access it later, and continue your work.

!pip install jovian
import jovian
Collecting jovian Using cached jovian-0.2.18-py2.py3-none-any.whl (64 kB) Collecting click Using cached click-7.1.2-py2.py3-none-any.whl (82 kB) Requirement already satisfied: requests in /srv/conda/envs/notebook/lib/python3.8/site-packages (from jovian) (2.24.0) Collecting uuid Using cached uuid-1.30.tar.gz (5.8 kB) Collecting pyyaml Using cached PyYAML-5.3.1.tar.gz (269 kB) Requirement already satisfied: idna<3,>=2.5 in /srv/conda/envs/notebook/lib/python3.8/site-packages (from requests->jovian) (2.10) Requirement already satisfied: certifi>=2017.4.17 in /srv/conda/envs/notebook/lib/python3.8/site-packages (from requests->jovian) (2020.6.20) Requirement already satisfied: chardet<4,>=3.0.2 in /srv/conda/envs/notebook/lib/python3.8/site-packages (from requests->jovian) (3.0.4) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /srv/conda/envs/notebook/lib/python3.8/site-packages (from requests->jovian) (1.25.10) Building wheels for collected packages: uuid, pyyaml Building wheel for uuid (setup.py) ... done Created wheel for uuid: filename=uuid-1.30-py3-none-any.whl size=6500 sha256=e0e2c706ee45dcac91b200cef5b63317df1a84e4d9421d1173f697111e229279 Stored in directory: /home/jovyan/.cache/pip/wheels/1b/6c/cb/f9aae2bc97333c3d6e060826c1ee9e44e46306a178e5783505 Building wheel for pyyaml (setup.py) ... done Created wheel for pyyaml: filename=PyYAML-5.3.1-cp38-cp38-linux_x86_64.whl size=464550 sha256=7f203edd0bbd9930aa9575480a389dd420f5c6ba3122ce4186dfb7a8eeab0bac Stored in directory: /home/jovyan/.cache/pip/wheels/13/90/db/290ab3a34f2ef0b5a0f89235dc2d40fea83e77de84ed2dc05c Successfully built uuid pyyaml Installing collected packages: click, uuid, pyyaml, jovian Successfully installed click-7.1.2 jovian-0.2.18 pyyaml-5.3.1 uuid-1.30
jovian.commit(project='pandas-practice-assignment', environment=None)
[jovian] Attempting to save notebook.. [jovian] Please enter your API key ( from https://jovian.ml/ ): API KEY: ········ [jovian] Updating notebook "abmaulachela/pandas-practice-assignment" on https://jovian.ml/ [jovian] Uploading notebook.. [jovian] Committed successfully! https://jovian.ml/abmaulachela/pandas-practice-assignment
# Run the next line to install Pandas
!pip install pandas --upgrade
Collecting pandas Using cached pandas-1.1.2-cp38-cp38-manylinux1_x86_64.whl (10.4 MB) Collecting pytz>=2017.2 Using cached pytz-2020.1-py2.py3-none-any.whl (510 kB) Collecting numpy>=1.15.4 Using cached numpy-1.19.2-cp38-cp38-manylinux2010_x86_64.whl (14.5 MB) Requirement already satisfied, skipping upgrade: python-dateutil>=2.7.3 in /srv/conda/envs/notebook/lib/python3.8/site-packages (from pandas) (2.8.1) Requirement already satisfied, skipping upgrade: six>=1.5 in /srv/conda/envs/notebook/lib/python3.8/site-packages (from python-dateutil>=2.7.3->pandas) (1.15.0) Installing collected packages: pytz, numpy, pandas Successfully installed numpy-1.19.2 pandas-1.1.2 pytz-2020.1
import pandas as pd