21AIM46A - DATA SCIENCE
MODULE 2
Descriptive Statistics: Reasons to study Statistics, Sampling,
Data Analysis Process, Mean, Median, Standard Deviation, Skewness,
Kurtosis, Graphical Representation-Box Plots, Pivot Table, Heat Map
Correlation, Statistics–ANOVA. DataPreparation: Need for Data Pre-
processing, DataTransforms, and Rescale Data Standardize Data,
Normalize Data, Binarize Data, Univariate and Bivariate Data,
Recursive Feature Elimination, Principal Component Analysis.
Why study statistics?
• Computers allow us to collect and store information in quantities that
previously would not even have been dreamed of.
• It might be costs, values, sales volumes, measurements, ratings,
distances, prices, percentages, counts, times, or market shares.
• But raw, undigested data stored on computer disks is of no use until we
can start to make sense of it.
• The field of statistics provides the scientist with some of the most useful
techniques for evaluating ideas, testing theory, and discovering the
truth.
• Statistics is the human side of the computer revolution, the science (and
art!) of extracting meaning from seemingly incomprehensible data..
• Statistics is the science concerned with developing and studying
methods for collecting, analyzing, interpreting and presenting empirical
data.
Basically, there are two types of statistics.
• Descriptive Statistics
• Inferential Statistics
In the case of descriptive statistics, the data or collection of data is
described in summary. But in the case of inferential stats, it is used to
explain the descriptive one.
Basics of Statistics
• The basics of statistics include the measure of central tendency and the
measure of dispersion. The central tendencies are mean, median and mode
and dispersions comprise variance and standard deviation.
• Mean is the average of the observations. Median is the central value when
observations are arranged in order. The mode determines the most frequent
observations in a data set.
• Variation is the measure of spread out of the collection of data. Standard
deviation is the measure of the dispersion of data from the mean. The square
of standard deviation is equal to the variance.
Population and Sample
Population and Sample
Population
• For blood CBC, would you draw few drops or drain the blood
completely from a person?
• If you want to measure the average length of your hair, would you
take a few hair samples or shave your head off?
Population and Sample
The sample size varies from 1 to population size-1(excluding 0 and
population array itself)
Number of samples =(2)population size-2
Examples:
For a population of size 4,number of samples =2 4-2, ie,14
For a population of size 10,number of samples =2 10-2 ie,1024-
2=1022
Population and Sample
You are given an array of ages. How many samples can it have?
Can u write them as well?
Ages=[25,23,21,22,20,23,19]
Solution:
Size of population=7
Population and Sample
It helps in getting the ideas of what customers would love to purchase or eat
according to their previous order history.
Data Science also helps in making future predictions.
For example, the airlines can predict the prices for their flights according to the customers’
previous booking history.
Data Science also helps in getting recommendations.
As an example, Netflix can give recommendations based on the previous browsing history
of videos and ratings given by users to the videos.
Population and Sample
Central Tendency
• The purpose of central tendency is to find a single numerical value to represent a
range of data.
Central Tendency
Central Tendency
Central Tendency
d) A left-skewed distribution has a long
left tail. Left-skewed distributions are
also called negatively-
skewed distributions. That’s because
there is a long tail in the negative
direction on the number line. The mean
is also to the left of the peak.
e) A right-skewed distribution has a long
right tail. Right-skewed distributions are
also called positive-skew distributions.
That’s because there is a long tail in the
positive direction on the number line.
The mean is also to the right of the peak.
Mean
Mean
Median
Median
Median - Example
Median - Example
Median - Example
Median - Example
Mode
• The mode is the value that appears most frequently in a data set.
For example, in the following list of numbers, 16 is the mode since it
appears more times in the set than any other number:
3, 3, 6, 9, 16, 16, 16, 27, 27, 37, 48
On a histogram it represents the
highest bar in a bar chart or
histogram. You can, therefore,
sometimes consider the mode as
being the most popular option.
• Normally, the mode is used for categorical data where we wish to
know which is the most common category, as illustrated below:
One of the problems with the mode is that it is not unique, so it leaves us with problems when we have
two or more values that share the highest frequency, such as below:
3, 3, 3, 9, 16, 16, 16, 27, 37, 48
• In the above example, both the number 3 and the number 16 are modes as they each occur three
times and no other number occurs more often.
• If no number in a set of numbers occurs more than once, that set has no mode:
3, 6, 9, 16, 27, 37, 48
• A set of numbers with two modes is bimodal, a set of numbers with three modes is trimodal, and
any set of numbers with more than one mode is multimodal.
• Mode is very rarely used with continuous data.
• Another problem with the mode is that it will not provide us with a very
good measure of central tendency when the most common mark is far
away from the rest of the data in the data set, as depicted in the diagram
below:
When not to use the mean?
• Mean is particularly susceptible to the influence of outliers..
For example, consider the wages of staff at a factory below:
The mean salary for these ten staff is $30.7k.
Staff 1 2 3 4 5 6 7 8 9 10
Salary 15k 18k 16k 14k 15k 15k 12k 17k 90k 95k
• The mean is being skewed by the two large salaries. Therefore, in this
situation, we would like to have a better measure of central
tendency-,mode
• Another time when we usually prefer the median over the mean (or
mode) is when our data is skewed (i.e., the frequency distribution for
our data is skewed).
• As the data becomes skewed the mean loses its ability to provide the
best central location for the data because the skewed data is dragging
it away from the typical value. However, the median best retains this
position and is not as strongly influenced by the skewed values
• When you have a normally distributed sample you can legitimately use both the mean or the
median as your measure of central tendency.
• In fact, in any symmetrical distribution the mean, median and mode are equal. However, in
this situation, the mean is widely preferred as the best measure of central tendency because it
is the measure that includes all the values in the data set for its calculation, and any change in
any of the scores will affect the value of the mean. This is not the case with the median or
mode.
• However, when our data is skewed, for example, as with the right-skewed data set below:
We find that the mean is being dragged in the direct of the
skew. In these situations, the median is generally considered
to be the best representative of the central location of the
data. The more skewed the distribution, the greater the
difference between the median and mean, and the greater
emphasis should be placed on using the median as opposed
to the mean
Summary of when to use the mean, median and mode
Example
Example
Example
Example
Descriptive Statistics
Why understanding measures of variability is necessary?
• Central tendency is a way to determine the most frequently occurring
value in a dataset. For instance, the mean is often used to represent the
central point of a dataset. However, it does not provide information on
the distance of a specific data point from the center.
• Low variation represents clustered data around the center, which
means the data are similar as they fall around the center point.
However, high variation in the data set describes the scattered data
points, which means that the data values are dissimilar and might have
extreme values.
Measure of Spread - Variance
•The graph is a normal distribution graph of data points and
mean
•The variance measures the average degree to which each point
differs from the mean.
Measure of Spread - Variance
Measure of Spread - Variance
Measure of Spread – Variance - Example
Standard Deviation
Standard Deviation
Standard Deviation - Example
Standard Deviation
• The scores for 6 basketball players at Friday's game are: 26, 42, 22, 20, 32,
and 20. Find the variance and standard deviation
• The number of sales a salesman had in the previous 7 days are: 5, 1, 2, 1, 6,
5, and 1. Calculate the variance and standard deviation
• The number of goals scored for a soccer team's previous games are: 4, 0,
2, 2, 3, 3, 6, and 4. Find the variance and standard deviation
Shape of data :Skewness and Kurtosis
• The understanding shape of data is a crucial action. It helps to
understand where the most information is lying and analyze the
outliers in a given data.
• Skewness and Kurtosis are statistical measures used to describe the
shape and characteristics of a distribution in statistics.
• Skewness is a measure of symmetry (or, more specifically, the lack of
symmetry in the data set), which can be positive or negative.
• In contrast, Kurtosis measures the tailedness of a distribution (i.e., it
quantifies the extremity of outliers in the distribution). Tailedness
refers to how often the outliers occur.
Skewness
In statistics, skewness is a degree of asymmetry observed in a
probability distribution that deviates from the symmetrical normal
distribution (bell curve) in a given set of data.
If the values of a specific independent variable (feature) are skewed,
depending on the model, skewness may violate model assumptions or
may reduce the interpretation of feature importance.
Skewness
The normal distribution helps to know a skewness. When we talk
about normal distribution, data is symmetrically distributed.
The symmetrical distribution has zero skewness as all measures of a
central tendency lies in the middle.
Why Skewness
When data is symmetrically distributed, the left-hand side, and right-
hand side, contain the same number of observations.
If the dataset has 90 values, then the left-hand side has 45
observations, and the right-hand side has 45 observations.
But, what if not symmetrical distributed? That data is called
asymmetrical data,
That time skewness comes into the picture.
Types of Skewness - Positive skewed or right-skewed
In statistics, a positively skewed distribution is a sort of distribution.
Positively Skewed Distribution is a type of distribution where the
mean, median, and mode of the distribution are positive rather than
negative or zero.
Positive skewed or Right-skewed
The extreme positive skewness is not desirable for distribution, as a high
level of skewness can cause misleading results.
The data transformation tools are helping to make the skewed data closer
to a normal distribution.
For positively skewed distributions, the famous transformation is the log
transformation.
The log transformation proposes the calculations of the natural logarithm
for each value in the dataset.
Types of Skewness - Negative skewed or Left-skewed
A negatively skewed distribution is the straight reverse of a positively skewed
distribution.
In statistics, negatively skewed distribution refers to the distribution model
where more values are plots on the right side of the graph, and the tail of the
distribution is spreading on the left side.
In negatively skewed, the mean of the data is less than the median (a large
number of data-pushed on the left-hand side).
Negatively Skewed Distribution is a type of distribution where the mean,
median, and mode of the distribution are negative rather than positive or zero.
Negative skewed or Left-skewed
Measuring skewness
Two methods to measure skewness include Pearson’s first and second coefficients of
skewness.
Pearson’s first coefficient of skewness
To calculate skewness values, subtract a mode from a mean, and then divide the difference by
standard deviation.
Pearson’s correlation coefficient differs from -1 (perfect negative linear relationship) to +1 (perfect positive
linear relationship), including a value of 0 indicating no linear relationship
Pearson’s first coefficient of skewness is helping if the data present high mode. But, if the data have
low mode or various modes, Pearson’s first coefficient is not preferred, and Pearson’s second
coefficient may be superior, as it does not rely on the mode.
Pearson’s second coefficient of skewness
Multiply the difference by 3, and divide the product by the standard deviation.
Rule of thumb :
If the skewness is between -0.5 & 0.5, the data are nearly symmetrical.
If the skewness is between -1 & -0.5 (negative skewed) or between 0.5 & 1(positive skewed), the
data are slightly skewed.
If the skewness is lower than -1 (negative skewed) or greater than 1 (positive skewed), the data
are extremely skewed.
Kurtosis
Kurtosis refers to the degree of presence of outliers in
the distribution.
It provides information about the tails and peakedness
of the distribution compared to a normal distribution
Positive kurtosis indicates heavier tails and a more
peaked distribution, while negative kurtosis suggests
lighter tails and a flatter distribution. Kurtosis helps in
analyzing the characteristics and outliers of a dataset..
In finance, kurtosis is used as a measure of financial risk.
A large kurtosis is associated with a high level of risk for an
investment because it indicates that there are high probabilities of
extremely large and extremely small returns.
On the other hand, a small kurtosis signals a moderate level of risk
because the probabilities of extreme returns are relatively low.
Excess Kurtosis
The excess kurtosis is used in statistics and probability theory to
compare the kurtosis coefficient with that normal distribution.
Excess kurtosis can be positive (Leptokurtic distribution), negative
(Platykurtic distribution), or near to zero (Mesokurtic distribution).
Since normal distributions have a kurtosis of 3, excess kurtosis is
calculated by subtracting kurtosis by 3.
Excess kurtosis = Kurt – 3
Peakedness in a data distribution is the degree to which data values
are concentrated around the mean.
Datasets with high kurtosis tend to have a distinct peak near the
mean, decline rapidly, and have heavy tails.
Datasets with low kurtosis tend to have a flat top near the mean
rather than a sharp peak.
Excess Kurtosis - Types
Leptokurtic or heavy-tailed distribution (kurtosis more than normal distribution).
Mesokurtic (kurtosis same as the normal distribution).
Platykurtic or short-tailed distribution (kurtosis less than normal distribution).
Leptokurtic/heavy-tailed distribution (kurtosis > 3)
Leptokurtic is having very long and thick tails, which means there are more
chances of outliers.
Positive values of kurtosis indicate that distribution is peaked and possesses
thick tails.
An extreme positive kurtosis indicates a distribution where more of the numbers
are located in the tails of the distribution instead of around the mean.
Platykurtic / short-tailed distribution (kurtosis < 3)
Platykurtic having a thin tail and stretched around the center means
most data points are present in high proximity to the mean.
A platykurtic distribution is flatter (less peaked) when compared with
the normal distribution.
Mesokurtic (kurtosis = 3)
Mesokurtic is the same as the normal distribution.
In Mesokurtic, distributions are moderate in breadth, and curves are
a medium peaked height.
Difference Between Skewness and Kurtosis
[Link] evaluates how much a distribution deviates from symmetry, while
Kurtosis gauges the degree of its peakiness or flatness.
[Link] range of values for both Skewness and Kurtosis spans from negative
infinity to positive infinity.
[Link] symmetry and normality are indicated by both zero skewness and
zero kurtosis.
[Link] can impact the central tendency of a distribution, whereas kurtosis
can influence its tail behavior.
[Link] Skewness and Kurtosis provide insights into the shape characteristics of
distributions.
Covariance
Covariance
The formula holds for population covariance
Covariance
For sample covariance, you have to divide by n-1.
Covariance Example
Covariance Example
Covariance Example
Covariance Example
Covariance Example
1. Find both sample and population covariance for following data x = {6,5,3,4,2}, y =
{12,10,8,6,4}
2. Calculate Population cov(x,y), Sample cov(x,y) from the following data
X Y
300 800
350 900
400 1000
450 1100
500 1200
550 • 1300
600 1400
650 1500
700 1600
Variance Covariance
Correlation
Correlation is a statistical measure used to calculate the directional relationship
between two variables, also adding some surety or strength to it.
In simple terms, it tells how much the trend of one variable affects the trend of
another variable.
We will also read somewhere, that it signifies how much one attribute is a
replica of the other.
It can vary from -1 to +1.
It depends on the size of the attributes.
Correlation
Positive Correlation - Indicates that two variables tend to show some
similar characteristics. Growth in one leads to growth in another.
Zero Correlation - Indicates that two variables tend to show no
characteristics. Growth in one shows no relation to others.
Negative Correlation – Indicates that two variables tend to show
some dissimilar characteristics. Growth in one leads to a decline in the
other.
Correlation
Correlation
Box Plot
Box plot or whisker plot is a type of chart that depicts a group of numerical
data.
Box plot is the method to graphically show the spread of a numerical
variable through quartiles.
It is a simple way to visualize the shape of our data.
The shape of the boxplot shows how the data is distributed and it also shows
any outliers
It makes comparing characteristics of data between categories very easy.
Box Plot
Components of a Box plot
Minimum – It is the minimum value in the dataset excluding the outliers
First Quartile (Q1) – 25% of the data lies below the First (lower) Quartile.
Median (Q2) – It is the mid-point of the dataset. Half of the values lie below it
and half above.
Third Quartile (Q3) – 75% of the data lies below the Third (Upper) Quartile.
Maximum – It is the maximum value in the dataset excluding the outliers.
Box Plot
The box plot shown in the below diagram is a perfect plot with no skewness.
The plots can have skewness and the median might not be at the center of the
box.
The area inside the box (50% of the data) is known as the Inter Quartile Range.
The IQR is calculated as IQR = Q3-Q1
Box Plot - Outlier
Outliers are the data points below and above the lower and upper
limit.
The lower and upper limit is calculated as
Lower Limit = Q1 - 1.5*IQR
Upper Limit = Q3 + 1.5*IQR
The values below and above these limits are considered outliers and
the minimum and maximum values are calculated from the points
which lie under the lower and upper limits.
How to create a box plot
Let us take sample data to understand how to create a box plot.
Here are the runs scored by a cricket team in a league of 12 matches –
100,120,110,150,110,140,130,170,120,220,140,110.
To draw a box plot for the given data first we need to arrange the data
in ascending order and then find the minimum, first quartile, median,
third quartile, and the maximum.
How to create a box plot
Ascending Order
100,110,110,110,120,120,130,140,140,150,170,220
Median (Q2) = (120+130)/2 = 125 ; Since there were even values.
To find the First Quartile we take the first six values and find their median.
Q1 = (110+110)/2 = 110
For the Third Quartile, we take the next six and find their median.
Q3 = (140+150)/2 = 145
Calculate the Inter Quartile Range.
IQR = Q3-Q1 = 145-110 = 35
How to create a box plot
Now calculate the Upper and Lower Limits to find the minimum and maximum values and also
the outliers if any.
Lower Limit = Q1-1.5*IQR = 110-1.5*35 = 57.5
Upper Limit = Q3+1.5*IQR = 145+1.5*35 = 197.5
So the minimum and maximum between the range [57.5,197.5] for our given data are
(100,110,110,110,120,120,130,140,140,150,170,220)
Minimum = 100
Maximum = 170
The outliers which are outside this range are – Outliers = 220
Box Plot
Box Plots show the Skewness of the data-
a) If the Median is at the center of the Box and the whiskers are almost the same on both ends
then the data is Normally Distributed.
b) If the Median lies closer to the First Quartile and if the whisker at the lower end is
shorter (as in the above example) then it has a Positive Skew (Right Skew).
c) If the Median lies closer to the Third Quartile and if the whisker at the upper end is
shorter then it has a Negative Skew (Left Skew).
Use of Box Plot
Quickly compare distributions
View central tendency of the data
Highlight the variability of the data
Determine whether a sample distribution is symmetric or skewed
Check for outliers
Draw a Box and Whisker diagram for the number of books taken out of
the library per month by first year students and compare this with the
box and whisker diagram for the number of books taken out of the
library per month by third year students.
The number of books taken out of the library per month by first year
students from a sample of 15 is as follows:
3, 0, 12, 0, 2, 0, 26, 0, 7, 5, 5, 2, 1, 1, 2.
The number of books taken out of the library per month by third year
students from a sample of 15 is as follows:
12, 0, 9, 4, 15, 2, 6, 10, 27, 15, 5, 9, 1, 14, 2.
24, 58, 61, 67, 71, 73, 76, 79, 82, 83, 85, 87, 88, 88, 92, 93, 94,
97
Syntax for Box Plot
Syntax :
[Link] (x=None, y=None, hue=None, data=None, order=None, hue_order=None,
orient=None, color=None, palette=None, saturation=0.75, width=0.8, dodge=True,
fliersize=5, linewidth=None, whis=1.5, notch=False, ax=None, **kwargs)
Parameters:
x = feature of dataset
y = feature of dataset
hue = feature of dataset
data = dataframe or full dataset
color = color name
Example for Box Plot
# import the required library
import numpy as np
import pandas as pd
import [Link] as plt
% matplotlib inline
# load the dataset
df = pd.read_csv("[Link]")
Example for Box Plot
# import the required library
import numpy as np
import pandas as pd
import [Link] as plt
% matplotlib inline
# load the dataset
df = pd.read_csv("[Link]")
[Link](by ='day', column =['total_bill'], grid = False)
Syntax for Box Plot
[Link](by ='size', column =['tip'], grid = False)
Pivot Table
A pivot table is a powerful data summarization tool that can automatically
sort, count, and sum up data stored in tables and display the summarized data.
The pivot table takes simple column-wise data as input, and groups the entries
into a two-dimensional table that provides a multidimensional summarization
of the data.
Pivot tables in Pandas are popularly seen in MS Excel files.
The tool does not actually change the spreadsheet or database itself, it simply
“pivots” or turns the data to view it from different perspectives.
Pivot Table
In Python Pivot tables of Pandas Data frames can be created using the command
pd.pivot_table
Syntax:
pandas.pivot_table(data, values=None, index=None, columns=None, aggfunc=’mean’, fill_value=None,
margins=False, dropna=True, margins_name=’All’, observed=False)
Returns
DataFrame, An Excel style pivot table
Purpose:
Create a spreadsheet-style pivot table as a Data Frame.
The levels in the pivot table of pandas will be stored in MultiIndex objects (hierarchical indexes) on the
index and columns of the result DataFrame
Pivot Table
Parameters:
data: Dataframe, The dataset whose pivot table is to be made.
values: column to aggregate, optional
index: Column, Used for indexing the feature passed in the values argument
columns: Column, Used for aggregating the values according to certain features
observed bool, (default False): This parameter is only applicable for categorical
features. If it is set to ‘True’ then the table will show values only for categorical
groups
How to make a pivot table?
Use the pd.pivot_table() function and specify what feature should go in the rows and columns using the index and
columns parameters respectively.
The feature that should be used to fill in the cell values should be specified in the values parameter.
Ex:
import pandas as pd
import numpy as np
df = [Link]({'First Name': ['Aryan', 'Rohan', 'Riya', 'Yash', 'Siddhant', ],
'Last Name': ['Singh', 'Agarwal', 'Shah', 'Bhatia', 'Khanna'],
'Type': ['Full-time Employee', 'Intern', 'Full-time Employee', 'Part-time Employee', 'Full-time Employee'],
'Department': ['Administration', 'Technical', 'Administration’, 'Technical', 'Management'],
'YoE': [2, 3, 5, 7, 6],
'Salary': [20000, 5000, 10000, 10000, 20000]})
df
How to make a pivot table?
Pivot Table
Use pd.pivot_table and specify the data, index, columns, aggfunc and `values`
parameters.
output = pd.pivot_table(data=df,
index=['Type'],
columns=['Department'],
values='Salary',
aggfunc='mean')
output
Pivot table with multiple aggregation functions
If column parameter is not specified, it will aggregate based on the
index.
output = pd.pivot_table(data=df, index=['Type'],
values='Salary',
aggfunc=['sum', 'mean', 'count'])
output
How to calculate row and column grand totals in pivot_table?
Now, let’s take a look at the grand total of the salary of each type of employee. For this,
we will use the margins and the margins_name parameter.
# Calculate row and column totals (margins)
output = pd.pivot_table(data=df, index=['Type'],
values='Salary',
aggfunc=['sum', 'mean', 'count'],
margins=True,
margins_name='Grand Total')
output
How to aggregate for multiple features in pivot table?
We can also perform different aggregations on different features. This helps in applying
appropriate operations on different features without having to create multiple pivot tables.
output = pd.pivot_table(data=df, index='Type’,
values=['Salary', 'YoE'],
columns=['Department'],
aggfunc={'Salary': [Link], 'YoE': [Link]})
output
Replacing missing values
In the last table of the previous section, we # Replacing missing values
could see the total salary received by the
Output = pd.pivot_table(data=df,
employees in each department and the
index='Type’,
average experience of the employees in
values=['Salary', 'YoE'],
each department.
However, there are NaNs present in that columns=['Department'],
table. aggfunc={'Salary': [Link],
We can replace the NaNs with a suitable 'YoE': [Link]},
value using the fill_value parameter. In this
fill_value='Not applicable')
case, we will be replacing the NaN with
‘Not Applicable’.
output
Replacing missing values
# Replacing missing values
Output = pd.pivot_table(data=df,
index='Type’,
values=['Salary', 'YoE'],
columns=['Department'],
aggfunc={'Salary': [Link],
'YoE': [Link]},
fill_value='Not applicable')
output
Heat Map
Heatmap is defined as a graphical representation of data using colors to
visualize the value of the matrix.
In this, to represent more common values or higher activities brighter
colors basically reddish colors are used and to represent less common or
activity values, darker colors are preferred.
Heatmap is an interesting visualization that helps in knowing the data
intensity.
It conveys this information by using different colors and gradients.
Heat Map
Heatmap is also used in finding the correlation between different sets
of attributes.
Heatmap is also defined by the name of the shading matrix.
Heatmaps in Seaborn can be plotted by using the [Link]()
function.
Syntax for Heat Map
Syntax: [Link](data, *, vmin=None, vmax=None, cmap=None, center=None, annot_kws=None, linewidths=0, linecolor=’white’,
cbar=True, **kwargs)
Important Parameters:
data: 2D dataset that can be coerced into an ndarray.
vmin, vmax: Values to anchor the colormap, otherwise they are inferred from the data and other keyword arguments.
cmap: The mapping from data values to color space.
center: The value at which to center the colormap when plotting divergent data.
annot: If True, write the data value in each cell.
fmt: String formatting code to use when adding annotations.
linewidths: Width of the lines that will divide each cell.
linecolor: Color of the lines that will divide each cell.
cbar: Whether to draw a color bar on side of heatmap
All the parameters except data are optional.
Returns: An object of type [Link]._subplots.AxesSubplot
Example for Heat Map
import numpy as np
import seaborn as sn
import [Link] as plt
# generating 2-D 10x10 matrix of random numbers
data = [Link](low = 1,high = 100,size = (10, 10))
print("The data to be plotted:\n")
print(data)
# plotting the heatmap
hm = [Link](data = data)
# displaying the plotted heatmap
[Link]()