I'm trying to create a new Dataframe with a multi index. I load a list with the dates for the first level and have a list of patients for the second level. I can't grasp the method for constructing the proper Dataframe structure... Basic code.
factor_index = pd.date_range(start=startDate, end=endDate)
factor_index.name = 'Date'
factorData = pd.DataFrame(index=factor_index)
this creates the frame with the dates as the primary index... I need to set a second index for each of the dates that lists the patients under each date. I have a list of patients. It seems like there's a one-liner for this but I can't seem to find it in my searching.