0% found this document useful (0 votes)
4 views

2.1 - Introduction To Data Analytics

Uploaded by

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

2.1 - Introduction To Data Analytics

Uploaded by

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

UNIVERSITY INSTITUTE OF COMPUTING

MASTER OF COMPUTER APPLICATIONS

PYTHON PROGRAMMING
24CAH-606

DISCOVER . LEARN . EMPOWER


1
UNIT-2 DATA ANALYTICS
Introduction to Data Analytics
Introduction to Data Analytics, requirements of data analytics in Python.
Introduction to Numpy, features, environment setup, numpy Ndarray,
array creation data types, array attributes, numpy operations,
mathematical and statistical functions
Introduction to matplotlib
Introduction to matplotlib, Figure class, Axes class, line plot, subplots,
Bar plot, histogram, scatter plot, pie chart, box plot, area chart, word
cloud, Bee swarm plot, violin graph, working with text, Customizing
Plots: Titles, labels, and legends.
Implement Switch Statements with the match and case
Keywords in

match term:
case pattern-1:
action-1
case pattern-2:
action-2
case pattern-3:
action-3
case _:
action-default

3
Implement Switch Statements with the match and case
Keywords in
lang = input("What's the programming language you want to learn? ")
match lang:
case "JavaScript":
print("You can become a web developer.")
case "Python":
print("You can become a Data Scientist")
case "PHP":
print("You can become a backend developer")
case "Java":
print("You can become a mobile app developer")
case _:
print("The language doesn't matter, what matters is solving problems.")
4
Introduction to Data Analytics

Data analytics is the process of exploring and analyzing large datasets to


make predictions and boost data-driven decision making. Data analytics
allows us to collect, clean, and transform data to derive meaningful
insights. It helps to answer questions, test hypotheses, or disprove
theories.

5
Introduction to Data Analytics

Data Analytics Process Steps


There are primarily five steps involved in the data analytics process, which
include:
• Data Collection: The first step in data analytics is to collect or gather
relevant data from multiple sources. Data can come from different
databases, web servers, log files, social media, excel and CSV files, etc.
• Data Preparation: The next step in the process is to prepare the data. It
involves cleaning the data to remove unwanted and redundant values,
converting it into the right format, and making it ready for analysis. It
also requires data wrangling.
• Data Exploration: After the data is ready, data exploration is done using
various data visualization techniques to find unseen trends from the data.
6
Introduction to Data Analytics

• Data Modeling: The next step is to build your predictive models


using machine learning algorithms to make future predictions.
• Result interpretation: The final step in any data analytics process is
to derive meaningful results and check if the output is in line with
your expected results.

7
Libraries in Python
• Python library is a collection of codes and methods that allow to perform many
actions without writing code.
• There are following different types of libraries in Python:
• Numpy ( Numerical Computing)
• Matlotlib (Data visualization)
• Pandas (Data manuplation)

8
NumPy

• NumPy is a Python package.


• It stands for 'Numerical Python’.
• It is a library consisting of multidimensional array objects and a
collection of routines for processing of array.
• It also has functions for working in domain of linear algebra, fourier
transform, and matrices.
• NumPy is a Python library and is written partially in Python, but most
of the parts that require fast computation are written in C or C++.

9
NumPy
• Examples:

10
Initializing NumPy Array with zeros:

11
NumPy
• Initializing NumPy Array with same number:

12
Initializing NumPy Array with a range
method:

13
NumPy
• NumPy Array Indexing

14
NumPy Array Slicing

15
NumPy
• Data Types in NumPy:

16
Initializing NumPy Array with a shape
method:

17
Initializing NumPy Array with a reshape
method:

18
NumPy
• Iterating Arrays

19
NumPy
• Joining NumPy Arrays:

20
NumPy
• Addition of NumPy Arrays:

21
NumPy
• Addition of NumPy Arrays:

22
NumPy
• NumPy Math Functions:

23
NumPy
• Splitting NumPy Arrays:

24
NumPy
• Searching and Sorting NumPy Arrays:

25
NumPy
• NumPy Filter Array:

26
NumPy
• Random Numbers in NumPy:

27
NumPy
• Random Numbers in NumPy:

28
NumPy
• Python NumPy Array v/s List:
• NumPy array used instead of a list because of the below three reasons:
• Less Memory
• Fast
• Convenient

29
NumPy
• Less Memory

The above output shows that the memory allocated by list (denoted by S) is 28000 whereas the
memory allocated by the NumPy array is just 4000. This is a major difference between the two and
this makes Python NumPy array as the preferred choice over list.

30
NumPy
• Fast and Convenient:

List took 983ms whereas the numpy array took almost 56ms. Hence, numpy array is faster than list. Now,
a ‘for’ loop is used for a list to find sum, whereas for numpy arrays, added the two array by simply
printing A1+A2. That’s why working with numpy is much easier and convenient than lists.

31
THANK YOU

32

You might also like