Hands-On Exploratory Data Analysis with Python. by Suresh Kumar Mukhiya

Hands-On Exploratory Data Analysis with Python. by Suresh Kumar Mukhiya

Author:Suresh Kumar Mukhiya [Suresh Kumar Mukhiya]
Language: eng
Format: epub
Tags: COM062000 - COMPUTERS / Data Modeling and Design, COM018000 - COMPUTERS / Data Processing, COM051360 - COMPUTERS / Programming Languages / Python
Publisher: Packt Publishing
Published: 2020-03-27T11:30:21+00:00


IQR is not affected by the presence of outliers. Let's get the IQR for the price column from the same dataframe we have been using so far:

price = df.price.sort_values()

Q1 = np.percentile(price, 25)

Q2 = np.percentile(price, 50)

Q3 = np.percentile(price, 75)

IQR = Q3 - Q1

IQR

The output of the preceding snippet is as follows:

8718.5

Next, let's visualize the quartiles using the box plot.

Visualizing quartiles

First of all, let's generate some data. Let's assume that the following are the scores obtained by students in three different subjects:

scorePhysics = [34,35,35,35,35,35,36,36,37,37,37,37,37,38,38,38,39,39,40,40,40,40,40,41,42,42,42,42,42,42,42,42,43,43,43,43,44,44,44,44,44,44,45,45,45,45,45,46,46,46,46,46,46,47,47,47,47,47,47,48,48,48,48,48,49,49,49,49,49,49,49,49,52,52,52,53,53,53,53,53,53,53,53,54,54,54,54,54,54,54,55,55,55,55,55,56,56,56,56,56,56,57,57,57,58,58,59,59,59,59,59,59,59,60,60,60,60,60,60,60,61,61,61,61,61,62,62,63,63,63,63,63,64,64,64,64,64,64,64,65,65,65,66,66,67,67,68,68,68,68,68,68,68,69,70,71,71,71,72,72,72,72,73,73,74,75,76,76,76,76,77,77,78,79,79,80,80,81,84,84,85,85,87,87,88]



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.