MaineDSA / membership_dashboard

Show member data from nationally-provided CSV files
GNU General Public License v3.0
2 stars 2 forks source link

Improved Data Structure #29

Open bmos opened 7 months ago

bmos commented 7 months ago

MEMB_LISTS is currently a dict structured as Date: DataFrame. MEMB_METRICS is currently a dict of dicts structured as Column: Date: Series and needs to be in a format like this to facilitate the timeline construction.

From some reading, it sounds pandas has pivot functions that can convert between these in simpler ways if the entire data was stored in a single DataFrame. I just have not been able to figure out how all that works so far.

I think what I'm looking for a multi-index based on actionkit_id and list date, but I'm not sure.