SlideShare a Scribd company logo
1 of 20
Download to read offline
Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan)
Python for Data Analysis
(ITP & NPV Group Project)
Chethan, Chandra, Nagabhushan and Divyamsh
Project Team 2
MTechProjectPresentation
2
Overview of Python Libraries for Data Analysis (Numpy
Pandas Visualisation) part of the presentation)
Data Analysis on ECOMMERCE PURCHASE
Various Data plots using Matplotlib and Seaborn
libraries and other public utilities
Using public libraries like GMPLOT
Introduction to print() Function in Python
Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 3
Summary from the “Ecommerce Purchase” Dataset
The data is predominently a list of purchases from the E-commerse site by a
corporate users
The analysis shows, who bought the most
What professions use this site and to purchase what
What kind of browsers and what kind of Machines they use.
We have also tried to analyse, if the cost of servicing is more for certain states
(least user base)
All the analysis is shown using the graphs.
Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 4
Which card is being used the most by the customers
Based on this data, the merchant
can decide and promote certain user
base based on the card types,
like the example of offer on HDFC
cards in India (Here they can offer
discounts or tie up with the certain
card companies to increase the
base.
df['CC Provider'].value_counts().plot(kind='pie',autopct='%1.1f%%')
plt.show()
df['CC Provider'].value_counts().plot(kind='bar')
plt.show()
Code snippet
Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 5
Who are the frequent visitors and who logs in least
Designers, Lawyers are the top 2
people, who visit the site for purchase
Who visit the least
highOcc=df.groupby('Job').sum()['Purchase
Price'].sort_values(ascending=False).head(10)
Code snippet
Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 6
75% of the cards in the commerce site have expired
chart=sns.countplot(df['CC Exp Date']<"09/20")
Code snippet
The payments/repeat orders on the cards
stored in the
E-commerce may not work as the cards
have expired.
This clearly shows that the frequency of
the users is less
This can also lead to the reduced sales in
the upcoming period
Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 7
The site should serve the top buying companies
Top 5 companies in terms of purchase
Brown Ltd 15
Smith Group 15
Smith PLC 13
Smith LLC 13
Willia ms LLC 12
Brown Limited and
its spread on cards
the employees use.
Smith Group and its
spread on cards the
employees use.
Code snippet
Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 8
Technological setup of the users (Promotions strategy)
Code snippet : l1 = df['Browser Info'].str.count('Linux').value_counts()[1]
w1 = df['Browser Info'].str.count('Windows').value_counts()[1]
m1 = df['Browser Info'].str.count('Mac').value_counts()[1]
x = ('Linux','Windows','Mac')
y = (l1,w1,m1)
plt.bar(x,y)
df.loc[df['Browser Info'].str.split('/').str.len() > 1, 'Browser Type'] = df['Browser Info'].str.split('/').str[0]
plt.figure(figsize=(10,6))
Code snippet :
Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 9
Google Map interface to show the least purchases
The code requires GOOGLE MAP API key, We are directly importing the ïŹle
genrated during the development as this involved cost
Code snippet :
import googlemaps, gmplot, webbrowser, os, json
apikey = '' # Add your google map API key
gmaps = googlemaps.Client(key=apikey) # Instantiating a google map
gmap = gmplot.GoogleMapPlotter.from_geocode('SC, US' , apikey=apikey)
print(type(Lowest_Buying_Cities))
for i in Lowest_Buying_Cities.index:
geocode_result = gmaps.geocode(i)
geom = geocode_result[0]['geometry']
loc = geom['location']
lat = loc['lat']
lng = loc['lng']
hidden_gem_lat, hidden_gem_lon = lat,lng
gmap.marker(hidden_gem_lat, hidden_gem_lon, 'red',title=i,label=i)
# Draw
gmap.draw("Lowest_Buying_Cities.html")
Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 10
PRINT() Function in Python - Team 2
print(), when called simply throws the cursor to the next line means, a blank line will be displayed
Print(“string”)
Example Output
print() Prints the ‘n’ character
print(“Hello”) Hello
print(‘Hello’) Hello
print(“Hello n World”) Hello
World
print(“Hello t World Hello World
print(“Hello n World”) Hello n World
print(3* ’Hello’) HelloHelloHello
print(“Hello”+”World”) HelloWorld
print(“Hello”,”World”) Hello World
Print(variable list)
Example Output
a, b = 1, 2
print (a,b)
1 2
print(a,b, sep=“,”) 1,2
print(a,b, sep=‘:’) 1:2
print(a,b, sep=‘- - - ‘ 1 - - - 2
print(“Hello”, end=“ “)
print(“World”) HelloWorld
print(“Hello”, end=“t”)
print(“World”)
Hello World
Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 11
Print(object)
Example Output
list=[10,’A’,”Hai”]
print(list)
[10, ‘A’, ‘Hai’]
d = {10:”Ram”, 20:”Amar”}
print(d)
{10:”Ram”, 20:”Amar”}
PRINT() Function in Python - Team 2 continued
Print(“String”, variable list)
Example Output
a=2
print(a,”: Even Number”)
print(“You typed”, a,”as input”)
2 : Even Number
You typed 2 as input
Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 12
PRINT() Function in Python - Team 2 continued
Print(formatted string) Syntax: print(“formatted string” % (variable list))
Example Output
a = 10
print("The value of a: %i" % a)
The value of a: 10
a, b = 10, 20
print("a: %dtb: %d" % (a, b))
a: 10 b: 20
name = "Ram"
print("Hai %s" % name)
print("Hai (%20s)" % name)
print("Hai (%-20s)" % name)
Hai Ram
Hai ( Ram)
Hai (Ram )
print("%c" % name[2]) m
print("%s" % name[0:2]) Ra
num = 123.345727
print("Num: %f" % num)
print("Num: %8.2f" % num)
Num: 123.345727
Num: 123.35
Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 13
Print(formatted string)
PRINT() Function in Python - Team 2 continued
Example output
a, b, c = 1, 2, 3
print("First= {0}". format(a))
print("First= {0}, Second= {1}". format(a, b))
print("First= {one}, Second= {two}". format(one=a, two=b))
print("First= {}, Second= {}". format(a, b))
First= 1
First= 1, Second= 2
First= 1, Second= 2
First= 1, Second= 2
name, salary = "Ram", 123.45
print("Hello {0}, your salary: {1}". format(name, salary))
print("Hello {n}, your salary: {s}". format(n=name, s=salary))
print("Hello {:s}, your salary: {:.2f}". format(name, salary))
print("Hello %s, your salary: %.2f" % (name, salary))
Hello Ram, your salary: 123.45
Hello Ram, your salary: 123.45
Hello Ram, your salary: 123.45
Hello Ram, your salary: 123.45
Syntax: print("formatted string" % (varaible list))
Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 14
APPENDIX
Download notebook
15
Available on request in Google Collab
Python Libraries for Data Science
Many popular Python toolboxes/libraries:
‱ NumPy
‱ Pandas
Visualization libraries
‱ matplotlib
‱ Seaborn
and many more 

16
All these libraries are
installed on the SCC
#Import Python Libraries
import numpy as np
import pandas as pd
import matplotlib as mpl
import seaborn as sns
Python Libraries for Data Science
NumPy:
â–Ș introduces objects for multidimensional arrays and matrices, as well as
functions that allow to easily perform advanced mathematical and statistical
operations on those objects
â–Ș provides vectorization of mathematical operations on arrays and matrices
which significantly improves the performance
â–Ș many other python libraries are built on NumPy
17
Python Libraries for Data Science
Pandas:
â–Ș adds data structures and tools designed to work with table-like data (similar to
Series and Data Frames in R)
â–Ș provides tools for data manipulation: reshaping, merging, sorting, slicing,
aggregation etc.
â–Ș allows handling missing data
18
Link: http://pandas.pydata.org/
matplotlib:
â–Ș python 2D plotting library which produces publication quality figures in a
variety of hardcopy formats
â–Ș a set of functionalities similar to those of MATLAB
â–Ș line plots, scatter plots, barcharts, histograms, pie charts etc.
â–Ș relatively low-level; some effort needed to create advanced visualization
Link: https://matplotlib.org/
Python Libraries for Data Science
19
Seaborn:
â–Ș based on matplotlib
â–Ș provides high level interface for drawing attractive statistical graphics
â–Ș Similar (in style) to the popular ggplot2 library in R
Link: https://seaborn.pydata.org/
Python Libraries for Data Science
20

More Related Content

What's hot

Singular value decomposition (SVD)
Singular value decomposition (SVD)Singular value decomposition (SVD)
Singular value decomposition (SVD)Luis Serrano
 
Kalman filter for object tracking
Kalman filter for object trackingKalman filter for object tracking
Kalman filter for object trackingMohit Yadav
 
Generative Adversarial Network (+Laplacian Pyramid GAN)
Generative Adversarial Network (+Laplacian Pyramid GAN)Generative Adversarial Network (+Laplacian Pyramid GAN)
Generative Adversarial Network (+Laplacian Pyramid GAN)NamHyuk Ahn
 
Introduction to image processing
Introduction to image processingIntroduction to image processing
Introduction to image processingThomas K T
 
Bresenham's line algorithm
Bresenham's line algorithmBresenham's line algorithm
Bresenham's line algorithmPooja Dixit
 
Data mining tools (R , WEKA, RAPID MINER, ORANGE)
Data mining tools (R , WEKA, RAPID MINER, ORANGE)Data mining tools (R , WEKA, RAPID MINER, ORANGE)
Data mining tools (R , WEKA, RAPID MINER, ORANGE)Krishna Petrochemicals
 
Decision making and branching
Decision making and branchingDecision making and branching
Decision making and branchingSaranya saran
 
Presentation of Visual Tracking
Presentation of Visual TrackingPresentation of Visual Tracking
Presentation of Visual TrackingYu-Sheng (Yosen) Chen
 
Computer Graphics - Lecture 00 - Introduction
Computer Graphics - Lecture 00 - IntroductionComputer Graphics - Lecture 00 - Introduction
Computer Graphics - Lecture 00 - IntroductionđŸ’» Anton Gerdelan
 
Support Vector Machines ( SVM )
Support Vector Machines ( SVM ) Support Vector Machines ( SVM )
Support Vector Machines ( SVM ) Mohammad Junaid Khan
 
Statistical classification: A review on some techniques
Statistical classification: A review on some techniquesStatistical classification: A review on some techniques
Statistical classification: A review on some techniquesGiorgos Bamparopoulos
 
Lecture 4 Decision Trees (2): Entropy, Information Gain, Gain Ratio
Lecture 4 Decision Trees (2): Entropy, Information Gain, Gain RatioLecture 4 Decision Trees (2): Entropy, Information Gain, Gain Ratio
Lecture 4 Decision Trees (2): Entropy, Information Gain, Gain RatioMarina Santini
 
K - Nearest neighbor ( KNN )
K - Nearest neighbor  ( KNN )K - Nearest neighbor  ( KNN )
K - Nearest neighbor ( KNN )Mohammad Junaid Khan
 
Fundamentals of Image Processing & Computer Vision with MATLAB
Fundamentals of Image Processing & Computer Vision with MATLABFundamentals of Image Processing & Computer Vision with MATLAB
Fundamentals of Image Processing & Computer Vision with MATLABAli Ghanbarzadeh
 
K means Clustering
K means ClusteringK means Clustering
K means ClusteringEdureka!
 
PAC Learning and The VC Dimension
PAC Learning and The VC DimensionPAC Learning and The VC Dimension
PAC Learning and The VC Dimensionbutest
 
Line drawing algo.
Line drawing algo.Line drawing algo.
Line drawing algo.Mohd Arif
 

What's hot (20)

Singular value decomposition (SVD)
Singular value decomposition (SVD)Singular value decomposition (SVD)
Singular value decomposition (SVD)
 
Kalman filter for object tracking
Kalman filter for object trackingKalman filter for object tracking
Kalman filter for object tracking
 
Generative Adversarial Network (+Laplacian Pyramid GAN)
Generative Adversarial Network (+Laplacian Pyramid GAN)Generative Adversarial Network (+Laplacian Pyramid GAN)
Generative Adversarial Network (+Laplacian Pyramid GAN)
 
Introduction to image processing
Introduction to image processingIntroduction to image processing
Introduction to image processing
 
Bresenham's line algorithm
Bresenham's line algorithmBresenham's line algorithm
Bresenham's line algorithm
 
Data mining tools (R , WEKA, RAPID MINER, ORANGE)
Data mining tools (R , WEKA, RAPID MINER, ORANGE)Data mining tools (R , WEKA, RAPID MINER, ORANGE)
Data mining tools (R , WEKA, RAPID MINER, ORANGE)
 
Decision making and branching
Decision making and branchingDecision making and branching
Decision making and branching
 
Presentation of Visual Tracking
Presentation of Visual TrackingPresentation of Visual Tracking
Presentation of Visual Tracking
 
Computer Graphics - Lecture 00 - Introduction
Computer Graphics - Lecture 00 - IntroductionComputer Graphics - Lecture 00 - Introduction
Computer Graphics - Lecture 00 - Introduction
 
Support Vector Machines ( SVM )
Support Vector Machines ( SVM ) Support Vector Machines ( SVM )
Support Vector Machines ( SVM )
 
Convex Hull Algorithms
Convex Hull AlgorithmsConvex Hull Algorithms
Convex Hull Algorithms
 
Statistical classification: A review on some techniques
Statistical classification: A review on some techniquesStatistical classification: A review on some techniques
Statistical classification: A review on some techniques
 
Image Stitching for Panorama View
Image Stitching for Panorama ViewImage Stitching for Panorama View
Image Stitching for Panorama View
 
Lecture 4 Decision Trees (2): Entropy, Information Gain, Gain Ratio
Lecture 4 Decision Trees (2): Entropy, Information Gain, Gain RatioLecture 4 Decision Trees (2): Entropy, Information Gain, Gain Ratio
Lecture 4 Decision Trees (2): Entropy, Information Gain, Gain Ratio
 
K - Nearest neighbor ( KNN )
K - Nearest neighbor  ( KNN )K - Nearest neighbor  ( KNN )
K - Nearest neighbor ( KNN )
 
Fundamentals of Image Processing & Computer Vision with MATLAB
Fundamentals of Image Processing & Computer Vision with MATLABFundamentals of Image Processing & Computer Vision with MATLAB
Fundamentals of Image Processing & Computer Vision with MATLAB
 
K means Clustering
K means ClusteringK means Clustering
K means Clustering
 
PAC Learning and The VC Dimension
PAC Learning and The VC DimensionPAC Learning and The VC Dimension
PAC Learning and The VC Dimension
 
Decision tree
Decision treeDecision tree
Decision tree
 
Line drawing algo.
Line drawing algo.Line drawing algo.
Line drawing algo.
 

Similar to Python for data analysis (ITP and NPV)

Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...
Informatics Practices (new) solution CBSE  2021, Compartment,  improvement ex...Informatics Practices (new) solution CBSE  2021, Compartment,  improvement ex...
Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...FarhanAhmade
 
PPT on Data Science Using Python
PPT on Data Science Using PythonPPT on Data Science Using Python
PPT on Data Science Using PythonNishantKumar1179
 
Introduction to Apache Flink
Introduction to Apache FlinkIntroduction to Apache Flink
Introduction to Apache Flinkmxmxm
 
Poetry with R -- Dissecting the code
Poetry with R -- Dissecting the codePoetry with R -- Dissecting the code
Poetry with R -- Dissecting the codePeter Solymos
 
Class 26: Objectifying Objects
Class 26: Objectifying ObjectsClass 26: Objectifying Objects
Class 26: Objectifying ObjectsDavid Evans
 
Map reduce hackerdojo
Map reduce hackerdojoMap reduce hackerdojo
Map reduce hackerdojonagwww
 
Tactical data engineering
Tactical data engineeringTactical data engineering
Tactical data engineeringJulian Hyde
 
Creating Beautiful Dashboards with Grafana and ClickHouse
Creating Beautiful Dashboards with Grafana and ClickHouseCreating Beautiful Dashboards with Grafana and ClickHouse
Creating Beautiful Dashboards with Grafana and ClickHouseAltinity Ltd
 
Data analysis in R
Data analysis in RData analysis in R
Data analysis in RAndrew Lowe
 
Apache Flink: API, runtime, and project roadmap
Apache Flink: API, runtime, and project roadmapApache Flink: API, runtime, and project roadmap
Apache Flink: API, runtime, and project roadmapKostas Tzoumas
 
maxbox starter60 machine learning
maxbox starter60 machine learningmaxbox starter60 machine learning
maxbox starter60 machine learningMax Kleiner
 
Lesson 2 data preprocessing
Lesson 2   data preprocessingLesson 2   data preprocessing
Lesson 2 data preprocessingAbdurRazzaqe1
 
CS 542 -- Query Execution
CS 542 -- Query ExecutionCS 542 -- Query Execution
CS 542 -- Query ExecutionJ Singh
 
Social media analytics using Azure Technologies
Social media analytics using Azure TechnologiesSocial media analytics using Azure Technologies
Social media analytics using Azure TechnologiesKoray Kocabas
 
Scientific calculator in c
Scientific calculator in cScientific calculator in c
Scientific calculator in cUpendra Sengar
 
Hands on Mahout!
Hands on Mahout!Hands on Mahout!
Hands on Mahout!OSCON Byrum
 

Similar to Python for data analysis (ITP and NPV) (20)

Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...
Informatics Practices (new) solution CBSE  2021, Compartment,  improvement ex...Informatics Practices (new) solution CBSE  2021, Compartment,  improvement ex...
Informatics Practices (new) solution CBSE 2021, Compartment, improvement ex...
 
PPT on Data Science Using Python
PPT on Data Science Using PythonPPT on Data Science Using Python
PPT on Data Science Using Python
 
Introduction to Apache Flink
Introduction to Apache FlinkIntroduction to Apache Flink
Introduction to Apache Flink
 
Poetry with R -- Dissecting the code
Poetry with R -- Dissecting the codePoetry with R -- Dissecting the code
Poetry with R -- Dissecting the code
 
Class 26: Objectifying Objects
Class 26: Objectifying ObjectsClass 26: Objectifying Objects
Class 26: Objectifying Objects
 
Clementine tool
Clementine toolClementine tool
Clementine tool
 
Map reduce hackerdojo
Map reduce hackerdojoMap reduce hackerdojo
Map reduce hackerdojo
 
Computer project
Computer projectComputer project
Computer project
 
Tactical data engineering
Tactical data engineeringTactical data engineering
Tactical data engineering
 
Creating Beautiful Dashboards with Grafana and ClickHouse
Creating Beautiful Dashboards with Grafana and ClickHouseCreating Beautiful Dashboards with Grafana and ClickHouse
Creating Beautiful Dashboards with Grafana and ClickHouse
 
Data analysis in R
Data analysis in RData analysis in R
Data analysis in R
 
Apache Flink: API, runtime, and project roadmap
Apache Flink: API, runtime, and project roadmapApache Flink: API, runtime, and project roadmap
Apache Flink: API, runtime, and project roadmap
 
maxbox starter60 machine learning
maxbox starter60 machine learningmaxbox starter60 machine learning
maxbox starter60 machine learning
 
ELAVARASAN.pdf
ELAVARASAN.pdfELAVARASAN.pdf
ELAVARASAN.pdf
 
Lesson 2 data preprocessing
Lesson 2   data preprocessingLesson 2   data preprocessing
Lesson 2 data preprocessing
 
CS 542 -- Query Execution
CS 542 -- Query ExecutionCS 542 -- Query Execution
CS 542 -- Query Execution
 
Social media analytics using Azure Technologies
Social media analytics using Azure TechnologiesSocial media analytics using Azure Technologies
Social media analytics using Azure Technologies
 
Scientific calculator in c
Scientific calculator in cScientific calculator in c
Scientific calculator in c
 
Hands on Mahout!
Hands on Mahout!Hands on Mahout!
Hands on Mahout!
 
Introduction to r
Introduction to rIntroduction to r
Introduction to r
 

Recently uploaded

Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto GonzĂĄlez Trastoy
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Russian Call Girls in Karol Bagh Aasnvi âžĄïž 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi âžĄïž 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi âžĄïž 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi âžĄïž 8264348440 💋📞 Independent Escort S...soniya singh
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 

Recently uploaded (20)

Call Girls In Mukherjee Nagar đŸ“± 9999965857 đŸ€© Delhi đŸ«Š HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar đŸ“±  9999965857  đŸ€© Delhi đŸ«Š HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar đŸ“±  9999965857  đŸ€© Delhi đŸ«Š HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar đŸ“± 9999965857 đŸ€© Delhi đŸ«Š HOT AND SEXY VVIP 🍎 SE...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Russian Call Girls in Karol Bagh Aasnvi âžĄïž 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi âžĄïž 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi âžĄïž 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi âžĄïž 8264348440 💋📞 Independent Escort S...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 

Python for data analysis (ITP and NPV)

  • 1. Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) Python for Data Analysis (ITP & NPV Group Project) Chethan, Chandra, Nagabhushan and Divyamsh Project Team 2
  • 2. MTechProjectPresentation 2 Overview of Python Libraries for Data Analysis (Numpy Pandas Visualisation) part of the presentation) Data Analysis on ECOMMERCE PURCHASE Various Data plots using Matplotlib and Seaborn libraries and other public utilities Using public libraries like GMPLOT Introduction to print() Function in Python
  • 3. Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 3 Summary from the “Ecommerce Purchase” Dataset The data is predominently a list of purchases from the E-commerse site by a corporate users The analysis shows, who bought the most What professions use this site and to purchase what What kind of browsers and what kind of Machines they use. We have also tried to analyse, if the cost of servicing is more for certain states (least user base) All the analysis is shown using the graphs.
  • 4. Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 4 Which card is being used the most by the customers Based on this data, the merchant can decide and promote certain user base based on the card types, like the example of offer on HDFC cards in India (Here they can offer discounts or tie up with the certain card companies to increase the base. df['CC Provider'].value_counts().plot(kind='pie',autopct='%1.1f%%') plt.show() df['CC Provider'].value_counts().plot(kind='bar') plt.show() Code snippet
  • 5. Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 5 Who are the frequent visitors and who logs in least Designers, Lawyers are the top 2 people, who visit the site for purchase Who visit the least highOcc=df.groupby('Job').sum()['Purchase Price'].sort_values(ascending=False).head(10) Code snippet
  • 6. Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 6 75% of the cards in the commerce site have expired chart=sns.countplot(df['CC Exp Date']<"09/20") Code snippet The payments/repeat orders on the cards stored in the E-commerce may not work as the cards have expired. This clearly shows that the frequency of the users is less This can also lead to the reduced sales in the upcoming period
  • 7. Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 7 The site should serve the top buying companies Top 5 companies in terms of purchase Brown Ltd 15 Smith Group 15 Smith PLC 13 Smith LLC 13 Willia ms LLC 12 Brown Limited and its spread on cards the employees use. Smith Group and its spread on cards the employees use. Code snippet
  • 8. Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 8 Technological setup of the users (Promotions strategy) Code snippet : l1 = df['Browser Info'].str.count('Linux').value_counts()[1] w1 = df['Browser Info'].str.count('Windows').value_counts()[1] m1 = df['Browser Info'].str.count('Mac').value_counts()[1] x = ('Linux','Windows','Mac') y = (l1,w1,m1) plt.bar(x,y) df.loc[df['Browser Info'].str.split('/').str.len() > 1, 'Browser Type'] = df['Browser Info'].str.split('/').str[0] plt.figure(figsize=(10,6)) Code snippet :
  • 9. Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 9 Google Map interface to show the least purchases The code requires GOOGLE MAP API key, We are directly importing the ïŹle genrated during the development as this involved cost Code snippet : import googlemaps, gmplot, webbrowser, os, json apikey = '' # Add your google map API key gmaps = googlemaps.Client(key=apikey) # Instantiating a google map gmap = gmplot.GoogleMapPlotter.from_geocode('SC, US' , apikey=apikey) print(type(Lowest_Buying_Cities)) for i in Lowest_Buying_Cities.index: geocode_result = gmaps.geocode(i) geom = geocode_result[0]['geometry'] loc = geom['location'] lat = loc['lat'] lng = loc['lng'] hidden_gem_lat, hidden_gem_lon = lat,lng gmap.marker(hidden_gem_lat, hidden_gem_lon, 'red',title=i,label=i) # Draw gmap.draw("Lowest_Buying_Cities.html")
  • 10. Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 10 PRINT() Function in Python - Team 2 print(), when called simply throws the cursor to the next line means, a blank line will be displayed Print(“string”) Example Output print() Prints the ‘n’ character print(“Hello”) Hello print(‘Hello’) Hello print(“Hello n World”) Hello World print(“Hello t World Hello World print(“Hello n World”) Hello n World print(3* ’Hello’) HelloHelloHello print(“Hello”+”World”) HelloWorld print(“Hello”,”World”) Hello World Print(variable list) Example Output a, b = 1, 2 print (a,b) 1 2 print(a,b, sep=“,”) 1,2 print(a,b, sep=‘:’) 1:2 print(a,b, sep=‘- - - ‘ 1 - - - 2 print(“Hello”, end=“ “) print(“World”) HelloWorld print(“Hello”, end=“t”) print(“World”) Hello World
  • 11. Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 11 Print(object) Example Output list=[10,’A’,”Hai”] print(list) [10, ‘A’, ‘Hai’] d = {10:”Ram”, 20:”Amar”} print(d) {10:”Ram”, 20:”Amar”} PRINT() Function in Python - Team 2 continued Print(“String”, variable list) Example Output a=2 print(a,”: Even Number”) print(“You typed”, a,”as input”) 2 : Even Number You typed 2 as input
  • 12. Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 12 PRINT() Function in Python - Team 2 continued Print(formatted string) Syntax: print(“formatted string” % (variable list)) Example Output a = 10 print("The value of a: %i" % a) The value of a: 10 a, b = 10, 20 print("a: %dtb: %d" % (a, b)) a: 10 b: 20 name = "Ram" print("Hai %s" % name) print("Hai (%20s)" % name) print("Hai (%-20s)" % name) Hai Ram Hai ( Ram) Hai (Ram ) print("%c" % name[2]) m print("%s" % name[0:2]) Ra num = 123.345727 print("Num: %f" % num) print("Num: %8.2f" % num) Num: 123.345727 Num: 123.35
  • 13. Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 13 Print(formatted string) PRINT() Function in Python - Team 2 continued Example output a, b, c = 1, 2, 3 print("First= {0}". format(a)) print("First= {0}, Second= {1}". format(a, b)) print("First= {one}, Second= {two}". format(one=a, two=b)) print("First= {}, Second= {}". format(a, b)) First= 1 First= 1, Second= 2 First= 1, Second= 2 First= 1, Second= 2 name, salary = "Ram", 123.45 print("Hello {0}, your salary: {1}". format(name, salary)) print("Hello {n}, your salary: {s}". format(n=name, s=salary)) print("Hello {:s}, your salary: {:.2f}". format(name, salary)) print("Hello %s, your salary: %.2f" % (name, salary)) Hello Ram, your salary: 123.45 Hello Ram, your salary: 123.45 Hello Ram, your salary: 123.45 Hello Ram, your salary: 123.45 Syntax: print("formatted string" % (varaible list))
  • 14. Team 2 : MTech Project Presentation (Chethan, Chandra, Divyamsh and Nagabhushan) 14 APPENDIX
  • 15. Download notebook 15 Available on request in Google Collab
  • 16. Python Libraries for Data Science Many popular Python toolboxes/libraries: ‱ NumPy ‱ Pandas Visualization libraries ‱ matplotlib ‱ Seaborn and many more 
 16 All these libraries are installed on the SCC #Import Python Libraries import numpy as np import pandas as pd import matplotlib as mpl import seaborn as sns
  • 17. Python Libraries for Data Science NumPy: â–Ș introduces objects for multidimensional arrays and matrices, as well as functions that allow to easily perform advanced mathematical and statistical operations on those objects â–Ș provides vectorization of mathematical operations on arrays and matrices which significantly improves the performance â–Ș many other python libraries are built on NumPy 17
  • 18. Python Libraries for Data Science Pandas: â–Ș adds data structures and tools designed to work with table-like data (similar to Series and Data Frames in R) â–Ș provides tools for data manipulation: reshaping, merging, sorting, slicing, aggregation etc. â–Ș allows handling missing data 18 Link: http://pandas.pydata.org/
  • 19. matplotlib: â–Ș python 2D plotting library which produces publication quality figures in a variety of hardcopy formats â–Ș a set of functionalities similar to those of MATLAB â–Ș line plots, scatter plots, barcharts, histograms, pie charts etc. â–Ș relatively low-level; some effort needed to create advanced visualization Link: https://matplotlib.org/ Python Libraries for Data Science 19
  • 20. Seaborn: â–Ș based on matplotlib â–Ș provides high level interface for drawing attractive statistical graphics â–Ș Similar (in style) to the popular ggplot2 library in R Link: https://seaborn.pydata.org/ Python Libraries for Data Science 20