NumPy, short for Numerical Python is a core library for scientific computing in Python. As the name suggests, it provides a host of tools and to conduct mathematical and numerical routines. One amongst these high-performing tools is the NumPy array. This multidimensional array object is a powerful data structure for efficient computation on vectors and matrices. In this article, we will explore these arrays and their power-packed functionalities.
As with any other package we start off by importing the library, numPy in this case, by its most commonly used alias, np.
import numpy as np
Array Creation Routines
Now with our np library ready to use, we can jump right into array creation. This array data structure may look simple but comes with usefulness in multitudes.
In: a = np.array([1,2,3,4,5,6,7,8]); a # Creates a 1-dimensional array
Introduction to Data Visualization with Matplotlib
Matplotlib is one of the most commonly used Python package for 2D-graphics. It provides a quick ways to visualize data from Python and also create publication-quality figures in various different formats. In this article, we are going to explore matplotlib in interactive mode covering 7 basic cases.
Matplotlib, Pyplot and IPython Shell
Before we dive into the details of firing Matplotlib and creating visualizations with it, there are a few useful things to take note. Matplotlib is a multi-platform data visualization library built on NumPy arrays. This allows it to work with the broader SciPy stack.
Another important feature is its ability to play well with many operating systems and graphics backends. Thus, making it a cross-platform software. Its everything-to-everyone approach is one of the great strengths of Matplotlib.
Real world data-sets contain numeric, texts, alpha-numeric, time-stamps, and various other unstructured data types. Then how does one store, retrieve and easily manipulate these multidimensional data-sets? The answer is a data science library like Pandas! Pandas is a powerful data analysis toolkit with high-performance and easy-to-use data structures. Unlike Excel and SQL, it carries a host of useful tools, methods and other functionalities that set it apart when it comes to row-wise and column-wise data manipulations. We will visit these functionalities in this tutorial.