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

Assignment 2 - Numpy Array Operations

This assignment is part of the course "Data Analysis with Python: Zero to Pandas". The objective of this assignment is to develop a solid understanding of Numpy array operations. In this assignment you will:

  1. Pick 5 interesting Numpy array functions by going through the documentation: https://numpy.org/doc/stable/reference/routines.html
  2. Run and modify this Jupyter notebook to illustrate their usage (some explanation and 3 examples for each function). Use your imagination to come up with interesting and unique examples.
  3. Upload this notebook to your Jovian profile using jovian.commit and make a submission here: https://jovian.ml/learn/data-analysis-with-python-zero-to-pandas/assignment/assignment-2-numpy-array-operations
  4. (Optional) Share your notebook online (on Twitter, LinkedIn, Facebook) and on the community forum thread: https://jovian.ml/forum/t/assignment-2-numpy-array-operations-share-your-work/10575 .
  5. (Optional) Check out the notebooks shared by other participants and give feedback & appreciation.

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.

Try to give your notebook a catchy title & subtitle e.g. "All about Numpy array operations", "5 Numpy functions you didn't know you needed", "A beginner's guide to broadcasting in Numpy", "Interesting ways to create Numpy arrays", "Trigonometic functions in Numpy", "How to use Python for Linear Algebra" etc.

NOTE: Remove this block of explanation text before submitting or sharing your notebook online - to make it more presentable.

Getting to Know Your Data is a Key Concept to Data Analysis

5 Numpy functions that everyone should know

Numerical Python extensions" or "NumPy

Python List are very powerful as they can hold any type of data, support operations to change, add and remove elements, this is wonderful but one feature is missing. A feature that is super important for data analysis.

When analysing data you will often want to carry operations over an entire collections of values and you want to do this fast.With list this is a problem i.e. this like perfoming calculations element wise .
This brings a desire to get Numeric into the Python.

So a way more elegant solution is to use Numpy or Numeric Python which was introuced in early 2005 by python developer "Travis Oliphant" who wanted to unify the community around a single array package and ported Numarray's features to Numeric releasing the result as NumPy 1.0 in 2006.This provide an alternative to regular python list "Numpy Array" which is almost similar to a array but with more features such as perfoming calculations over an entire arrays and its really easy and super fast.

You can think of Numpy as the the python type such as list, set , etc. which means it comes with its own methods which can behave different than you would expect.

Here are some of the most important functions for data anlysis and getting insight about your data.

  • normal
  • round
  • mean
  • median
  • column_stack

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.

!pip install jovian --upgrade -q
import jovian
jovian.commit(project='numpy-array-operations')
[jovian] Attempting to save notebook.. [jovian] Updating notebook "albyally5/numpy-array-operations" on https://jovian.ml/ [jovian] Uploading notebook.. [jovian] Capturing environment.. [jovian] Committed successfully! https://jovian.ml/albyally5/numpy-array-operations

Let's begin by importing Numpy and listing out the functions covered in this notebook.