pennmem/ptsa

Support for using pandas MultiIndex as coordinates

Closed this issue · 0 comments

xarray has awesome support for assigning a MultiIndex as a coordinate, and this is something we should definitely leverage.

Example uses:

  • This means you can have "event" as a dimension, with all of the columns of an event df as a coordinate.
  • You can create a MultiIndex by calling the .stack() method and combining two dimensions into one, for example combining "channels" and "frequencies" into a "features" dimension that is appropriate for classification.

It would be awesome to add into ptsa the following (at least):

  • Convenience/helper functions for converting to/from a multiIndex from recarrays or dataframes where this is not already obvious or easy.
  • Support for saving / loading TimeSeries with MultiIndex coordinates.