kutaslab / fitgrid

Multichannel event-related time-series regression modeling for EEG, MEG, and sensor array data
https://kutaslab.github.io/fitgrid
BSD 3-Clause "New" or "Revised" License
8 stars 4 forks source link

name index columns in DataFrames returned by FitGrids #130

Closed andportnoy closed 5 years ago

andportnoy commented 5 years ago
grid.params

returns a DataFrame with an index column of parameter names, but the index column itself is not named. It would be helpful to have these index columns named:

  1. If we get a single index column, name it using the parameter name used to query the FitGrid (e.g. params)
  2. If we get multiple index columns, name them using the parameter name + index subscript.
  3. If any of the index columns are named already, don't touch them.
andportnoy commented 5 years ago

We don't support multiindices anyway, so that makes life easier (cross out number 2 above): https://github.com/kutaslab/fitgrid/blob/282ff50b39d28d02fce633c7f376e64bdc9b1eb2/fitgrid/fitgrid.py#L211-L215

andportnoy commented 5 years ago

Nope, don't cross out number 2. When we get a DataFrame, we stack the columns into long form, which creates a MultiIndex.

andportnoy commented 5 years ago

closing for now