0% found this document useful (0 votes)
4 views10 pages

Numpy Code

NumPy is a key library for numerical computing in Python, offering efficient multi-dimensional arrays and mathematical functions for large datasets. It features N-dimensional arrays, high-performance storage, broadcasting, vectorization, and linear algebra routines. Additionally, the document discusses other libraries like Pandas for data manipulation and Matplotlib and Seaborn for data visualization.

Uploaded by

aimaniftikhar41
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views10 pages

Numpy Code

NumPy is a key library for numerical computing in Python, offering efficient multi-dimensional arrays and mathematical functions for large datasets. It features N-dimensional arrays, high-performance storage, broadcasting, vectorization, and linear algebra routines. Additionally, the document discusses other libraries like Pandas for data manipulation and Matplotlib and Seaborn for data visualization.

Uploaded by

aimaniftikhar41
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

NumPy(Numerical Python) is a fundamental library for Python numerical computing.

It
provides efficient multi-dimensional array objects and various mathematical functions for
handling large datasets making it a critical tool for professionals in fields that require heavy
computation.

Key Features of NumPy

NumPy has various features that make it popular over lists.

• N-Dimensional Arrays: NumPy's core feature is ndarray, a powerful N-dimensional


array object that supports homogeneous data types.

• Arrays with High Performance: Arrays are stored in contiguous memory locations,
enabling faster computations than Python lists (Please see Numpy Array vs Python
List for details).

• Broadcasting: This allows element-wise computations between arrays of different


shapes. It simplifies operations on arrays of various shapes by automatically aligning
their dimensions without creating new data.

• Vectorization: Eliminates the need for explicit Python loops by applying operations
directly on entire arrays.

• Linear algebra: NumPy contains routines for linear algebra operations, such as matrix
multiplication, decompositions, and determinants.

Create a 0-D array with value 42

Create a 1-D array containing the values 1,2,3,4,5:

Create a 2-D array containing two arrays with the values 1,2,3 and 4,5,6:
Create a 3-D array with two 2-D arrays, both containing two arrays with the values 1,2,3 and
4,5,6:
1. Pandas: Pandas are an important library for data scientists. It is an
open-source machine learning library that provides flexible high-
level data structures and a variety of analysis tools. It helps in data
analysis, data manipulation, and cleaning of data. Pandas support
operations like Sorting, Re-indexing, Iteration, Concatenation,
Conversion of data, Visualizations, Aggregations, etc.
Matplotlib is an open-source visualization library for the Python
programming language, widely used for
creating static, animated and interactive plots. It offers a variety of
plotting functionalities, including line plots, bar charts, histograms,
scatter plots and 3D visualizations. Created by John D. Hunter in 2003,
Matplotlib has become a fundamental tool for data visualization in
Python, extensively used by data scientists, researchers and engineers
worldwide.

What is Matplotlib in Python used for?


With Matplotlib, we can perform a wide range of visualization tasks,
including:
• Creating basic plots such as line, bar and scatter plots.
• Customizing plots with labels, titles, legends and color schemes.
• Adjusting figure size, layout and aspect ratios.
• Saving plots in various formats like PNG, PDF and SVG.
• Combining multiple plots into subplots for better data
representation.
• Creating interactive plots using the widget module
What is Seaborn
Seaborn is an amazing visualization library for statistical graphics
plotting in Python. It provides beautiful default styles and color palettes
to make statistical plots more attractive. It is built on top matplotlib
library and is also closely integrated with the data structures
from pandas.
Seaborn aims to make visualization the central part of exploring and
understanding data. It provides dataset-oriented APIs so that we can
switch between different visual representations for the same variables
for a better understanding of the dataset.

Different categories of plot in Seaborn


Plots are basically used for visualizing the relationship between
variables. Those variables can be either completely numerical or a
category like a group, class, or division. Seaborn divides the plot into the
below categories -

• Relational plots: This plot is used to understand the relation


between two variables.
• Categorical plots: This plot deals with categorical variables and
how they can be visualized.
• Distribution plots: This plot is used for examining univariate and
bivariate distributions
• Regression plots: The regression plots in Seaborn are primarily
intended to add a visual guide that helps to emphasize patterns in
a dataset during exploratory data analyses.
• Matrix plots: A matrix plot is an array of scatterplots.
• Multi-plot grids: It is a useful approach to draw multiple instances
of the same plot on different subsets of the dataset.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy