Open rly opened 3 years ago
Given a DynamicTableRegion, e.g., ElectricalSeries.electrodes, to access the IDs of the subset of the table, one needs to do:
DynamicTableRegion
ElectricalSeries.electrodes
electrode_table_indices = eseries.electrodes.data[:] selected_elect_ids = eseries.electrodes.table.id[electrode_table_indices]
Or
selected_elect_ids = list(eseries.electrodes.to_dataframe().index)
It would be a nicer user interface to allow:
eseries.electrodes['id'][:] # or eseries.electrodes[:, 'id'] # or even eseries.electrodes.id[:]
Also, given a DynamicTable, e.g., NWBFile.electrodes, to access the IDs of the table, one needs to do:
DynamicTable
NWBFile.electrodes
nwbfile.electrodes.id[:] nwbfile.electrodes['id'][:]
but
nwbfile.electrodes[:, 'id']
does not work, a main inconsistency with how users access data from a column.
@stephprince A good start in digging into DynamicTableRegion
Given a
DynamicTableRegion
, e.g.,ElectricalSeries.electrodes
, to access the IDs of the subset of the table, one needs to do:Or
It would be a nicer user interface to allow:
Also, given a
DynamicTable
, e.g.,NWBFile.electrodes
, to access the IDs of the table, one needs to do:but
does not work, a main inconsistency with how users access data from a column.
Checklist