Standard DataFrame methods
You are given the diabetes
dataset storing information on female patients tested for diabetes. You will focus on blood glucose levels and the test results. Subjects, tested positively, usually have higher blood glucose levels after performing the so-called glucose tolerance test. Your task is to investigate whether it is true for this specific dataset.
The plasma glucose
column corresponds to the glucose levels. The test result
column corresponds to the diabetes test results.
You must use standard DataFrame methods (the numpy
module is not imported for you).
Este exercício faz parte do curso
Practicing Coding Interview Questions in Python
Instruções do exercício
- Load the data from the
diabetes.csv
file. - Calculate the mean glucose level in the entire dataset.
- Group the data according to the diabetes test results.
- Calculate the mean glucose levels per group.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Load the data from the diabetes.csv file
diabetes = ____
print(diabetes.info())
# Calculate the mean glucose level in the entire dataset
print(____)
# Group the data according to the diabetes test results
diabetes_grouped = ____
# Calculate the mean glucose levels per group
print(____)