May 2017
Intermediate to advanced
270 pages
6h 18m
English
One of the most appreciated features of Pandas is the simple and concise expression of data analysis pipelines that requires grouping, transforming, and aggregating the data. To demonstrate this concept, let's extend our dataset by adding two new patients to whom we didn't administer the treatment (this is usually called a control group). We also include a column, drug_admst, which records whether the patient was administered the treatment:
patients = ["a", "b", "c", "d", "e", "f"] columns = { "sys_initial": [120, 126, 130, 115, 150, 117], "dia_initial": [75, 85, 90, 87, 90, 74], "sys_final": [115, 123, 130, 118, 130, 121], "dia_final": [70, 82, 92, 87, 85, 74], "drug_admst": [True, True, True, True, ...Read now
Unlock full access