How do internal Pandas functions allocate memory for operations that have an uncertain number of output rows? For example when joining two dataframes the number of output rows depends on the values of the inputs. You don't really know how many rows there will be until you have completed the join. Does Pandas perform two passes? Does it use a dynamic data structure? If so, which?