Open AshlinHarris opened 2 years ago
For example, if we're trying to keep track of which patients have which medications, instead of trying to build a data frame directly, we could first build a Dict{Patient, Set{Medication}}
where the keys are the patient IDs, and the value is the set of medications for that particular patient.
So this Dict{Patient, Set{Medication}}
would be a sort of "intermediate representation". And then we can use this dictionary later when to build the wide DataFrame.
Related: #81
Currently,
pivot()
relies onDataFrames.unstack()
. It might be better to instead build an intermediate representation of the data, and then use that intermediate representation to construct the wide data frame.