How can I load and feed data from multiple excel/csv sheets into the mutliselect function?

Yes, if the original data tables (excel files) have variable time series periods as columns then unpivot those columns into two columns, e.g. Year, Value. Then with all tables in the same shape you can concatenate them all together. Also add an extra column to identify the source and any other columns that would help you slice by series and prevent unwanted aggregations across unrelated series. This is known as building a columnar data table representation. The trick is using the pandas melt function.

If your data is already unpivoted (sounds like it is), then simply add the additional columns you need to help with the sifting. If the years column are the index then you need to reindex so the years exist as a separate column and the tables append will work as expected.

1 Like