Skip to main content

Introduction to Numpy | Pandas | Matplotlib | in Python

 

Introduction to Numpy | Pandas | Matplotlib | in Python

Introduction

If you are starting to learn Data Visualization or Data Science in particular you must have heard or trying to learn about Pandas, or Numpy, or Matplotlib. This article will serve you the very basic and informative introduction to these keeping in mind the practical essence of code. It is very important to first understand the theory first and then to understand code, and if possible try to implement it in parallel, making sure that the resources that are required are fulfilled at an earlier stage.


What is Numpy

Numpy is a Python package for scientific computing, adding support to linear algebra, matrices, and Fourier transform. In fact, Numpy is an abbreviation of Numerical Python. One of the premier use of Numpy is in the field of the multidimensional container of generic data. In the case of Numpy, the array here is called as ndarray. Numpy serves as a function as Reshaping arrays, or aggregation or filtering or Statistical model, and many more.


import numpy as np
array1 = np.array([16,14,85])
print("Rank 1: \n",array1)
array2 = np.array([1, 2, 3],[8,6,7])               
print(" Rank 2: \n",array2)


What is Pandas

Pandas is a powerful tool used for data manipulation and analysis, it enables operations in a process where the operations for data manipulation and analysis are needed for desired structured output. It's fast and open-sources built on top of Python programming language.


import pandas as pd 
a = pd.Series([4,8,6,3,1,9,7,2,0])     
b = pd.Series([6.0,8.2,6.4,7.4,9.0,8.8])  
c = pd.Series(['one','two','three','four','five'])      
exe ={'first':a, 'second':b, 'third':c}    
df = pd.DataFrame(exe)  

What is Matplotlib

When it comes to visualizations with python then matplotlib is an important library for visualizations, it enables to deliver data to get understand in a visual form. The matplotlib library is very extensive and very much feature-rich.


To create a histogram:

from matplotlib import pyplot as plt 
y = [12,14,18,11,10] 
plt.hist(y) 
plt.show() 


To create  a line plot:

from matplotlib import pyplot as plt 
x1 = [6,7,8,9,1] 
y1 = [7,5,6,3,9]  
plt.plot(x1,y1) 
plt.show() 


Popular posts from this blog

What is Azure DataBricks

Azure DataBricks in Short Details Content to be covered Apache Spark Based Analytics Platform Apache Spark in Azure DataBricks Enterprise Security Integration with Azure Services Integration with PowerBI Introduction Microsoft Azure provides a cloud-based platform service known as Azure DataBricks which is an Apache Based Analytics Platform. It provides an interactive workspace that enables collaboration between Data Scientist, Data Engineers, and Business Analyst. Apache Spark Based Analytics Platform Spark in Azure DataBricks includes the following components: Spark SQL and Data Frame Streaming MLlib GraphX Spark Core API Apache Spark in Azure Databricks The DataBrick build on the spark provides a zero management cloud platform that includes: Fully managed Spark Clusters An interactive workspace for exploration and visualization A platform for powering Spark Based Applications. Enterprise Security Azure DataBricks provides enterprise-grade Azure Security. Integration with Azure Activ...

PowerShell Scripts - on Date and Time

  PowerShell Scripts - on Date and Time PowerShell - To Get System Date Command -   Get-Date  is used to get the current date. PowerShell - To Get System Time Command -   Get - Date   - DisplayHint   Time  is used to get the current system time PowerShell - To Set System Time Command -  set - date   adjust $timeToAdd is used to set time as required. PowerShell - To Set System Date Command -  Set-Date  is used to set system Date