OpenSourceEconomics/pybaum

Additional option for flattening pandas DataFrames

janosg opened this issue · 1 comments

Currently the user can decide between two ways of treating DataFrames

  1. Only the entries in a fixed set of columns appears in the flat list of leaves
  2. All entries appear in the flat list of leaves.

In estimagic a third mode would be very practical that automatically switches between the two cases above. If all columns from the specified subset are present, only those columns are considered. If None of the columns is present, all entries are considered.

If this sounds too special, we can also only add it in estimagic.

Decided to even simplify treating of DataFrames to only the second case here and have a custom registry entry in estimagic.