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 ejercicio forma parte del curso
Practicing Coding Interview Questions in Python
Instrucciones del ejercicio
- 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.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# 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(____)