How to convert a list of data frames to a panel in python-pandas?
问题 Given a list of data frames with the following format: id age weight score date 01 11 50 90 2011-01-23 01 12 52 89 2012-03-23 ... Please note that the id in a data frame is same. And I wish to get a panel, integrating all the data frames in the list, and with the columns ['age', 'weight', 'score'] as item-axis , and date as major-axis , and id as minor-axis . Do you know how to do that? Thank you in advance! 回答1: First step is to concat your frames together: concated = pd.concat(list_of