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
Downloading jovian-0.2.18-py2.py3-none-any.whl (64 kB)
|████████████████████████████████| 64 kB 1.1 MB/s eta 0:00:011
Requirement already satisfied: requests in /opt/conda/lib/python3.7/site-packages (from jovian) (2.23.0)
Requirement already satisfied: pyyaml in /opt/conda/lib/python3.7/site-packages (from jovian) (5.3.1)
Requirement already satisfied: click in /opt/conda/lib/python3.7/site-packages (from jovian) (7.1.1)
Collecting uuid
Downloading uuid-1.30.tar.gz (5.8 kB)
Requirement already satisfied: chardet<4,>=3.0.2 in /opt/conda/lib/python3.7/site-packages (from requests->jovian) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /opt/conda/lib/python3.7/site-packages (from requests->jovian) (1.24.3)
Requirement already satisfied: idna<3,>=2.5 in /opt/conda/lib/python3.7/site-packages (from requests->jovian) (2.9)
Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.7/site-packages (from requests->jovian) (2020.6.20)
Building wheels for collected packages: uuid
Building wheel for uuid (setup.py) ... done
Created wheel for uuid: filename=uuid-1.30-py3-none-any.whl size=6500 sha256=d1a0d183f5ff6d7df9f5dfda4d0fcbf2a670243a8ca6aeab0d9659d18d325033
Stored in directory: /root/.cache/pip/wheels/2a/ea/87/dd57f1ecb4f0752f3e1dbf958ebf8b36d920d190425bcdc24d
Successfully built uuid
Installing collected packages: uuid, jovian
Successfully installed jovian-0.2.18 uuid-1.30
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/opt/conda/bin/python3.7 -m pip install --upgrade pip' command.
project='zero-to-pandas-pandas-practice-assignment'
jovian.commit(project=project, environment=None)
[jovian] Attempting to save notebook..
[jovian] Detected Kaggle notebook...
[jovian] Please enter your API key ( from https://jovian.ml/ ):
API KEY: ········
[jovian] Uploading notebook to https://jovian.ml/rishabh25126/zero-to-pandas-pandas-practice-assignment
# Run the next line to install Pandas
!pip install pandas --upgrade
Collecting pandas
Downloading pandas-1.1.2-cp37-cp37m-manylinux1_x86_64.whl (10.5 MB)
|████████████████████████████████| 10.5 MB 2.6 MB/s eta 0:00:01
Requirement already satisfied, skipping upgrade: pytz>=2017.2 in /opt/conda/lib/python3.7/site-packages (from pandas) (2019.3)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.7.3 in /opt/conda/lib/python3.7/site-packages (from pandas) (2.8.1)
Requirement already satisfied, skipping upgrade: numpy>=1.15.4 in /opt/conda/lib/python3.7/site-packages (from pandas) (1.18.5)
Requirement already satisfied, skipping upgrade: six>=1.5 in /opt/conda/lib/python3.7/site-packages (from python-dateutil>=2.7.3->pandas) (1.14.0)
Installing collected packages: pandas
Attempting uninstall: pandas
Found existing installation: pandas 1.1.1
Uninstalling pandas-1.1.1:
Successfully uninstalled pandas-1.1.1
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
hypertools 0.6.2 requires scikit-learn<0.22,>=0.19.1, but you'll have scikit-learn 0.23.2 which is incompatible.
Successfully installed pandas-1.1.2
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/opt/conda/bin/python3.7 -m pip install --upgrade pip' command.
import pandas as pd
import numpy as np