Context: I'm currently analyzing a dataset and attempting to utilize the split-apply-combine paradigm. Once I group the dataset I am able to add some columns that wouldn't have meaning before the grouping. I then want to go through these new columns in the grouped dataframes and collect their values in a new, combined dataframe to compute some metrics and provide outputs.
This leads to my question: I can do this by maintaining a set of lists, extending the lists for each grouped dataframe, and then creating a new dataframe at the end from the lists; or I can create a new dataframe to start with and append new rows to the dataframe as I go through the grouped dataframes. Would either of these approaches be considered more "pandorable" than the other?
Thanks!