Question: [Python] import pandas as pd df_ckd = pd.read_excel('ckd.xlsx') Question 5 What is the interquartile range of the age column for the people with ckd? Hints:

[Python]

import pandas as pd

df_ckd = pd.read_excel('ckd.xlsx')

Question 5

  1. What is the interquartile range of the age column for the people with ckd?

    • Hints:
      • Interquartile range is the difference between the 75th percentile and 25th percentile.
      • First, filter the data using a column: class. The filtered dataset should only contain observations where class is equal to "ckd".
      • You will then need to select the age column in the filtered dataset and compute its 75th percentile.
      • You will repeat the same steps to compute the 25th percentile.
      • Finally, take the difference between the 75th and 25th percentile.
      • Check Module 3c: Accessing columns and rows and Module 3d: Desriptive Statistics
  1. What is the interquartile range of the age column for the people without ckd?

    • Hints:
      • Interquartile range is the difference between the 75th percentile and 25th percentile.
      • First, filter the data using a column: class. The filtered dataset should only contain observations where class is equal to "notckd".
      • You will then need to select the age column in the filtered dataset and compute its 75th percentile.
      • You will repeat the same steps to compute the 25th percentile.
      • Finally, take the difference between the 75th and 25th percentile.
      • Check Module 3c: Accessing columns and rows and Module 3d: Desriptive Statistics

# Your code goes in here # Type your code after the equation sign.

iqr_ckd = iqr_notckd =

[Python] import pandas as pd df_ckd = pd.read_excel('ckd.xlsx') Question 5 What is

df_ckd.head (20) age bp sg al su rbc pc pcc ba bgr wbcc rbcc htn dm cad appet pe ane class 0 48.0 80.0 1.020 1.0 0.0 NaN normal notpresent notpresent 121.0 44.0 7800.0 5.2 yes yes no good no no ckd 1 7.0 50.0 1.020 4.0 0.0 NaN normal notpresent notpresent 118.0 38.0 6000.0 4.8 no no no good no no ckd 2 62.0 80.0 1.010 2.0 3.0 normal normal notpresent notpresent 423.0 ... 31.0 7500.0 NaN no yes no poor no yes ckd 3 48.0 70.0 1.005 4.0 0.0 normal abnormal present notpresent 117.0 32.0 6700.0 3.9 yes no no poor yes yes ckd 4 51.0 80.0 1.010 2.0 0.0 normal normal notpresent notpresent 106.0 35.0 7300.0 4.6 no no no good no no ckd 5 60.0 90.0 1.015 3.0 0.0 NaN NaN notpresent notpresent 74.0 39.0 7800.0 4.4 yes yes no good yes no ckd 6 68.0 70.0 1.010 0.0 0.0 NaN normal notpresent notpresent 100.0 36.0 9192.0 4.8 no no no good no no ckd 7 24.0 NaN 1.015 2.0 4.0 normal abnormal notpresent notpresent 410.0 ... 44.0 6900.0 5.0 no yes no good yes no ckd 8 52.0 100.0 1.015 3.0 0.0 normal abnormal present notpresent 138.0 33.0 9600.0 4.0 yes yes no good no yes ckd ... ... 9 53.0 90.0 1.020 2.0 0.0 abnormal abnormal present notpresent 70.0 29.0 12100.0 3.7 yes yes no poor no yes ckd 10 50.0 60.0 1.010 2.0 4.0 NaN abnormal present notpresent 490.0 28.0 NaN NaN yes yes no good no yes ckd

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!