SlideShare a Scribd company logo
R and Python, A Code Demo
Side by side code compare, basic introduction for one to
another switcher
Vineet Jaiswal
https://www.linkedin.com/in/jaiswalvineet/
R Programming
R is a programming language and free
software environment for statistical computing
and graphics
https://en.wikipedia.org/wiki/R_(programming_language)
Vineet | 2
Python Programming
Python is an open source interpreted high-level
programming language for general-purpose
programming.
https://en.wikipedia.org/wiki/Python_(programming_language)
Vineet | 3
Vineet | 4
I am skipping all the theoretical part, which
is important for your basic understanding
and recommended to learn.
The main focus of this presentation,
practical and real life problems, expected
that you know any of the both languages.
About this presentation
IDE
5 Vineet | 5
R Python
RStudio,
Visual Studio,
Jupyter,
Eclipse
Spyder,
Jupyter,
PyCharm,
Rodeo,
Visual Studio,
Eclipse
Key Notes :
RStudio is clear winner in R, one of the best IDE in any
language, Jupyter is very innovative, work on browser and
suitable for both
Data Operations
Arrays
Indexing, Slicing, and Iterating
Reshaping
Shallow vs deep copy
Broadcasting
Indexing (advanced)
Matrices
Matrix decompositions
Vineet | 6
R Python
R programming is specifically
for statistical computing, so
its naturally supporting all
aspect of it
NumPy + SciPy
Data Manipulation
Reading data
Selecting columns and rows
Filtering
Vectorized string operations
Missing values
Handling time
Time series
Vineet | 7
R Python
R Naturally support it but few
packages are awesome
plyr
Data.table
dplyr
Pandas (extraordinary) , On
top of NumPy
Data Visualization
Creating a Graph
Histograms and Density Plots
Dot Plots
Bar Plots
Line Charts
Pie Charts
Boxplots
Scatterplots
And a lot
Vineet | 8
R Python
R Naturally support it but its
classical, the most used one
Ggplot2(best), lattice, ggvis,
ggally
MatPlotLib, bokeh, plot.ly,
Google Visualization, D3
Key Notes :
Most of the libraries are
available in both, specially
which render on browser, still
R is most preferable for data
visualization
Machine Learning
Feature extraction
Classification
Regression
Clustering
Dimension reduction
Model selection
Decision Making
Deep learning
And a lot of mathematics
Vineet | 9
R Python
Caret, mlr, XGBoost, gbm,
H2O, CNTK
TensorFlow, SCIKIT-LEARN,
Keras, Theano, CNTK
Key Notes :
TensorFlow, a product by
google, which naturally support
Python kind of syntax but also
support R, is best for machine
learning and deep learning. A
winner without second thought
Text Mining
Natural language Processing
Recommendation Engine
Talking robot
Web Scraping
Chatbot
Or any thing which deal with
languages
Next level, Computer vision
Vineet | 10
R Python
TidyText, OpenNLP, tm,
Rweka
NLTK, TextBlob, textmining,
SpaCy
Key Notes :
NLTK is best for understanding all the basics
Most of the big players are giving ready to use API based
service
Install and use Libraries/Packages and working directories
Vineet | 11
R Python
install.packages(‘[Package Name’) in Rstudio
library([Package Name]) full package
dplyr::select selective package
Working Directory
getwd()
setwd(‘C://file/path’)
python -m pip install [package-name] in Window
CMD
import pandas as pd full package
from textblob.classifiers import
NaiveBayesClassifier selective package
Working Directory
import os
os.path.abspath('')
cd C:FilePath
Assignment and taking help
Vineet | 12
R Python
‘<-’ recommend but ‘=’ also working
one <- 1
?mean from base R
help.search(‘weighted mean’) like kind of search
help(package = ‘dplyr’) package search
??mean global search
‘=‘
one = 1
help(len) help on build in function 'len'
dir(len) list of all help
len? help on build in function 'len'
help(pd.unique) a package specific help, here pd
is pandas
Vector, List and Array
Vineet | 13
R Python
Vector
> c(1,2,3,4,5)
[1] 1 2 3 4 5
> c('a','b', 'c','d')
[1] "a" "b" "c" "d"
Multidimensional
two <- list(c(1.5,2,3), c(4,5,6))
[[1]]
[1] 1.5 2.0 3.0
[[2]]
[1] 4 5 6
import numpy as np
Array
np.array([1,2,3,4,5])
np.array(['a','b','c','d'])
List
[1,2,3,4,5]
['a','b','c','d']
Multidimensional
two = np.array([(1.5,2,3), (4,5,6)], dtype = float)
array([[1.5, 2. , 3. ],
[4. , 5. , 6. ]])
Multi dimensional list | Subsetting
Vineet | 14
R Python
> two[1]
[[1]]
[1] 1.5 2.0 3.0
> two[[2:3]]
[1] 6
> lapply(two, `[[`, 1)
[[1]]
[1] 1.5
[[2]]
[1] 4
two[1]
array([4., 5., 6.])
two[1,2]
6
two[0:2,0:1]
array([[1.5],
[4. ]])
Must remember : R index start from 1 and Python index start from 0
Data Frame, the most used one
Vineet | 15
R Python
> name <- c('vineet', 'jaiswal')
> id <- c(28,30)
> df = data.frame(id, name)
> df
id name
1 28 vineet
2 30 jaiswal
From List
df = pd.DataFrame(
[[4, 7],
[5, 8]],
index=[1, 2],
columns=['a', 'b'])
From Dictionary
data = {'Name':['Vineet', 'Jaiswal'],'Id':[28,30]}
df = pd.DataFrame(data)
Pandas also supporting multi index DataFrame
and I don't find anything in R, but yes, work around
available
Common command and Missing values
Vineet | 16
R Python
summary(df)
str(df)
dim(df)
head(df)
tail(df)
length(df)
Missing values, represented as NA,
is.na(x)
is.nullI(x) for null values
df.describe()
df.info()
df.head()
df.tail()
df.shape
len(df)
Missing values, represented as NaN
math.isnan(x)
df.isnull().any() for data frame null values
Querying, Filtering and Sampling
Vineet | 17
R Python
slice(df, 1:10)
filter(df, col1 == 1, col2 == 1)
df[df$col1 == 1 & df$col2 == 1,]
select(df, col1, col2)
select(df, col1:col3)
select(df, -(col1:col3))
distinct(select(df, col1))
distinct(select(df, col1, col2))
sample_n(df, 10)
sample_frac(df, 0.01)
df.iloc[:9]
df.query('col1 == 1 & col2 == 1')
df[(df.col1 == 1) & (df.col2 == 1)]
df[['col1', 'col2']]
df.loc[:, 'col1':'col3']
df.drop(cols_to_drop, axis=1) but see [1]
df[['col1']].drop_duplicates()
df[['col1', 'col2']].drop_duplicates()
df.sample(n=10)
df.sample(frac=0.01)
Sorting, Transforming, Grouping and Summarizing
Vineet | 18
R Python
arrange(df, col1, col2)
arrange(df, desc(col1))
select(df, col_one = col1)
rename(df, col_one = col1)
mutate(df, c=a-b)
gdf <- group_by(df, col1)
summarise(gdf, avg=mean(col1, na.rm=TRUE))
summarise(gdf, total=sum(col1))
df.sort_values(['col1', 'col2'])
df.sort_values('col1', ascending=False)
df.rename(columns={'col1': 'col_one'})['col_one']
df.rename(columns={'col1': 'col_one'})
df.assign(c=df.a-df.b)
gdf = df.groupby('col1')
df.groupby('col1').agg({'col1': 'mean'})
df.groupby('col1').sum()
Apply and big operations
Vineet | 19
R Python
Apply a function on matrix
apply(), lapply() , sapply(), vapply(), mapply(),
rapply(), and tapply()
The most popular way to perform bigger operation
with data in SQL kind of syntax : Piping
iris %>%
group_by(Species) %>%
summarise(avg = mean(Sepal.Width)) %>%
arrange(avg)
As python is general purpose programming
language, you kind perform any kind of
collection/generic operation but the most of time
we are using
Lambda , map, reduce, filter and list
comprehension
It is advisable to learn both
R and Python
Vineet | 20
All the images, external links, etc are taken from internet for
non-business purposes, It helps to explain the concept, all
credit goes to their respective owners.
All the content are based on my best knowledge, please
validate before use and let me know if any error, feedback.
21
Thanks!
Contact me:
Vineet Jaiswal
https://www.linkedin.com/in/jais
walvineet/

More Related Content

What's hot (20)

PDF
Programming with Python - Basic
Mosky Liu
 
PPT
Introduction to Python
amiable_indian
 
PDF
Overview of python 2019
Samir Mohanty
 
PPTX
Python Tutorial Part 2
Haitham El-Ghareeb
 
ODP
Python Presentation
Narendra Sisodiya
 
PPTX
Python Tutorial Part 1
Haitham El-Ghareeb
 
PDF
The Benefits of Type Hints
masahitojp
 
PPT
F# and the DLR
Richard Minerich
 
PDF
Python Workshop
Mantavya Gajjar
 
PPTX
Why Python?
Adam Pah
 
PPTX
Python Programming Language
Laxman Puri
 
PPTX
Python training
Kunalchauhan76
 
PPTX
Fundamentals of Python Programming
Kamal Acharya
 
PPTX
Learn python – for beginners
RajKumar Rampelli
 
PDF
Python programming
Prof. Dr. K. Adisesha
 
PPTX
Introduction to python
Ayshwarya Baburam
 
PPTX
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Maulik Borsaniya
 
PDF
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
EditorIJAERD
 
PDF
Python basics_ part1
Elaf A.Saeed
 
DOCX
PYTHON NOTES
Ni
 
Programming with Python - Basic
Mosky Liu
 
Introduction to Python
amiable_indian
 
Overview of python 2019
Samir Mohanty
 
Python Tutorial Part 2
Haitham El-Ghareeb
 
Python Presentation
Narendra Sisodiya
 
Python Tutorial Part 1
Haitham El-Ghareeb
 
The Benefits of Type Hints
masahitojp
 
F# and the DLR
Richard Minerich
 
Python Workshop
Mantavya Gajjar
 
Why Python?
Adam Pah
 
Python Programming Language
Laxman Puri
 
Python training
Kunalchauhan76
 
Fundamentals of Python Programming
Kamal Acharya
 
Learn python – for beginners
RajKumar Rampelli
 
Python programming
Prof. Dr. K. Adisesha
 
Introduction to python
Ayshwarya Baburam
 
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Maulik Borsaniya
 
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
EditorIJAERD
 
Python basics_ part1
Elaf A.Saeed
 
PYTHON NOTES
Ni
 

Similar to R and Python, A Code Demo (20)

PDF
Practical data science_public
Long Nguyen
 
PDF
Data analystics with R module 3 cseds vtu
LalithauLali
 
PDF
Python for R Users
Ajay Ohri
 
PDF
R - the language
Mike Martinez
 
PDF
Introduction to r studio on aws 2020 05_06
Barry DeCicco
 
PPTX
R language introduction
Shashwat Shriparv
 
PDF
R the unsung hero of Big Data
Dhafer Malouche
 
PPTX
Introduction to R
Stacy Irwin
 
PDF
R programming & Machine Learning
AmanBhalla14
 
PPTX
Machine Learning with SparkR
Olgun Aydın
 
PDF
Introduction to R for data science
Long Nguyen
 
PDF
R basics
Sagun Baijal
 
PPTX
Big data analytics with R tool.pptx
salutiontechnology
 
PDF
Recent Developments In SparkR For Advanced Analytics
Databricks
 
PDF
Learning R via Python…or the other way around
Sid Xing
 
PDF
What's new in pandas and the SciPy stack for financial users
Wes McKinney
 
PDF
R Programming - part 1.pdf
RohanBorgalli
 
PDF
R tutorial
Richard Vidgen
 
PDF
Python vs. r for data science
Hugo Shi
 
PDF
R programming Basic & Advanced
Sohom Ghosh
 
Practical data science_public
Long Nguyen
 
Data analystics with R module 3 cseds vtu
LalithauLali
 
Python for R Users
Ajay Ohri
 
R - the language
Mike Martinez
 
Introduction to r studio on aws 2020 05_06
Barry DeCicco
 
R language introduction
Shashwat Shriparv
 
R the unsung hero of Big Data
Dhafer Malouche
 
Introduction to R
Stacy Irwin
 
R programming & Machine Learning
AmanBhalla14
 
Machine Learning with SparkR
Olgun Aydın
 
Introduction to R for data science
Long Nguyen
 
R basics
Sagun Baijal
 
Big data analytics with R tool.pptx
salutiontechnology
 
Recent Developments In SparkR For Advanced Analytics
Databricks
 
Learning R via Python…or the other way around
Sid Xing
 
What's new in pandas and the SciPy stack for financial users
Wes McKinney
 
R Programming - part 1.pdf
RohanBorgalli
 
R tutorial
Richard Vidgen
 
Python vs. r for data science
Hugo Shi
 
R programming Basic & Advanced
Sohom Ghosh
 
Ad

Recently uploaded (20)

PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Ad

R and Python, A Code Demo

  • 1. R and Python, A Code Demo Side by side code compare, basic introduction for one to another switcher Vineet Jaiswal https://www.linkedin.com/in/jaiswalvineet/
  • 2. R Programming R is a programming language and free software environment for statistical computing and graphics https://en.wikipedia.org/wiki/R_(programming_language) Vineet | 2
  • 3. Python Programming Python is an open source interpreted high-level programming language for general-purpose programming. https://en.wikipedia.org/wiki/Python_(programming_language) Vineet | 3
  • 4. Vineet | 4 I am skipping all the theoretical part, which is important for your basic understanding and recommended to learn. The main focus of this presentation, practical and real life problems, expected that you know any of the both languages. About this presentation
  • 5. IDE 5 Vineet | 5 R Python RStudio, Visual Studio, Jupyter, Eclipse Spyder, Jupyter, PyCharm, Rodeo, Visual Studio, Eclipse Key Notes : RStudio is clear winner in R, one of the best IDE in any language, Jupyter is very innovative, work on browser and suitable for both
  • 6. Data Operations Arrays Indexing, Slicing, and Iterating Reshaping Shallow vs deep copy Broadcasting Indexing (advanced) Matrices Matrix decompositions Vineet | 6 R Python R programming is specifically for statistical computing, so its naturally supporting all aspect of it NumPy + SciPy
  • 7. Data Manipulation Reading data Selecting columns and rows Filtering Vectorized string operations Missing values Handling time Time series Vineet | 7 R Python R Naturally support it but few packages are awesome plyr Data.table dplyr Pandas (extraordinary) , On top of NumPy
  • 8. Data Visualization Creating a Graph Histograms and Density Plots Dot Plots Bar Plots Line Charts Pie Charts Boxplots Scatterplots And a lot Vineet | 8 R Python R Naturally support it but its classical, the most used one Ggplot2(best), lattice, ggvis, ggally MatPlotLib, bokeh, plot.ly, Google Visualization, D3 Key Notes : Most of the libraries are available in both, specially which render on browser, still R is most preferable for data visualization
  • 9. Machine Learning Feature extraction Classification Regression Clustering Dimension reduction Model selection Decision Making Deep learning And a lot of mathematics Vineet | 9 R Python Caret, mlr, XGBoost, gbm, H2O, CNTK TensorFlow, SCIKIT-LEARN, Keras, Theano, CNTK Key Notes : TensorFlow, a product by google, which naturally support Python kind of syntax but also support R, is best for machine learning and deep learning. A winner without second thought
  • 10. Text Mining Natural language Processing Recommendation Engine Talking robot Web Scraping Chatbot Or any thing which deal with languages Next level, Computer vision Vineet | 10 R Python TidyText, OpenNLP, tm, Rweka NLTK, TextBlob, textmining, SpaCy Key Notes : NLTK is best for understanding all the basics Most of the big players are giving ready to use API based service
  • 11. Install and use Libraries/Packages and working directories Vineet | 11 R Python install.packages(‘[Package Name’) in Rstudio library([Package Name]) full package dplyr::select selective package Working Directory getwd() setwd(‘C://file/path’) python -m pip install [package-name] in Window CMD import pandas as pd full package from textblob.classifiers import NaiveBayesClassifier selective package Working Directory import os os.path.abspath('') cd C:FilePath
  • 12. Assignment and taking help Vineet | 12 R Python ‘<-’ recommend but ‘=’ also working one <- 1 ?mean from base R help.search(‘weighted mean’) like kind of search help(package = ‘dplyr’) package search ??mean global search ‘=‘ one = 1 help(len) help on build in function 'len' dir(len) list of all help len? help on build in function 'len' help(pd.unique) a package specific help, here pd is pandas
  • 13. Vector, List and Array Vineet | 13 R Python Vector > c(1,2,3,4,5) [1] 1 2 3 4 5 > c('a','b', 'c','d') [1] "a" "b" "c" "d" Multidimensional two <- list(c(1.5,2,3), c(4,5,6)) [[1]] [1] 1.5 2.0 3.0 [[2]] [1] 4 5 6 import numpy as np Array np.array([1,2,3,4,5]) np.array(['a','b','c','d']) List [1,2,3,4,5] ['a','b','c','d'] Multidimensional two = np.array([(1.5,2,3), (4,5,6)], dtype = float) array([[1.5, 2. , 3. ], [4. , 5. , 6. ]])
  • 14. Multi dimensional list | Subsetting Vineet | 14 R Python > two[1] [[1]] [1] 1.5 2.0 3.0 > two[[2:3]] [1] 6 > lapply(two, `[[`, 1) [[1]] [1] 1.5 [[2]] [1] 4 two[1] array([4., 5., 6.]) two[1,2] 6 two[0:2,0:1] array([[1.5], [4. ]]) Must remember : R index start from 1 and Python index start from 0
  • 15. Data Frame, the most used one Vineet | 15 R Python > name <- c('vineet', 'jaiswal') > id <- c(28,30) > df = data.frame(id, name) > df id name 1 28 vineet 2 30 jaiswal From List df = pd.DataFrame( [[4, 7], [5, 8]], index=[1, 2], columns=['a', 'b']) From Dictionary data = {'Name':['Vineet', 'Jaiswal'],'Id':[28,30]} df = pd.DataFrame(data) Pandas also supporting multi index DataFrame and I don't find anything in R, but yes, work around available
  • 16. Common command and Missing values Vineet | 16 R Python summary(df) str(df) dim(df) head(df) tail(df) length(df) Missing values, represented as NA, is.na(x) is.nullI(x) for null values df.describe() df.info() df.head() df.tail() df.shape len(df) Missing values, represented as NaN math.isnan(x) df.isnull().any() for data frame null values
  • 17. Querying, Filtering and Sampling Vineet | 17 R Python slice(df, 1:10) filter(df, col1 == 1, col2 == 1) df[df$col1 == 1 & df$col2 == 1,] select(df, col1, col2) select(df, col1:col3) select(df, -(col1:col3)) distinct(select(df, col1)) distinct(select(df, col1, col2)) sample_n(df, 10) sample_frac(df, 0.01) df.iloc[:9] df.query('col1 == 1 & col2 == 1') df[(df.col1 == 1) & (df.col2 == 1)] df[['col1', 'col2']] df.loc[:, 'col1':'col3'] df.drop(cols_to_drop, axis=1) but see [1] df[['col1']].drop_duplicates() df[['col1', 'col2']].drop_duplicates() df.sample(n=10) df.sample(frac=0.01)
  • 18. Sorting, Transforming, Grouping and Summarizing Vineet | 18 R Python arrange(df, col1, col2) arrange(df, desc(col1)) select(df, col_one = col1) rename(df, col_one = col1) mutate(df, c=a-b) gdf <- group_by(df, col1) summarise(gdf, avg=mean(col1, na.rm=TRUE)) summarise(gdf, total=sum(col1)) df.sort_values(['col1', 'col2']) df.sort_values('col1', ascending=False) df.rename(columns={'col1': 'col_one'})['col_one'] df.rename(columns={'col1': 'col_one'}) df.assign(c=df.a-df.b) gdf = df.groupby('col1') df.groupby('col1').agg({'col1': 'mean'}) df.groupby('col1').sum()
  • 19. Apply and big operations Vineet | 19 R Python Apply a function on matrix apply(), lapply() , sapply(), vapply(), mapply(), rapply(), and tapply() The most popular way to perform bigger operation with data in SQL kind of syntax : Piping iris %>% group_by(Species) %>% summarise(avg = mean(Sepal.Width)) %>% arrange(avg) As python is general purpose programming language, you kind perform any kind of collection/generic operation but the most of time we are using Lambda , map, reduce, filter and list comprehension
  • 20. It is advisable to learn both R and Python Vineet | 20
  • 21. All the images, external links, etc are taken from internet for non-business purposes, It helps to explain the concept, all credit goes to their respective owners. All the content are based on my best knowledge, please validate before use and let me know if any error, feedback. 21