You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with local datasets we have to setup a bunch of different column names in the DatasetDefinition.
It would be much nicer if standard column namings could be inferred.
Description of a solution
In some cases column names could be guessed. As a starting point we could reuse our internal standard for preprocessed files:
The default could also be set to True but that could be a breaking change so I'm ambivalent.
For each attribute, for example pixel, we would then write something like this:
component_suffixes= ['x', 'y', 'xl', 'yl', 'xr', 'yr', 'xa', 'ya']
ifauto_column_detectandpixel_columnsisNone: # I would vote for not overwriting specified columnscolumn_canditates= ['pixel_'+suffixforsuffixincomponent_suffixes]
pixel_columns= [cforcincolumn_canditatesifcingaze_df.frame.columns]
ifpixel_columns: # this part is from GazeDataFrame.__init__() and is false if the list is emptyself._check_component_columns(pixel_columns=pixel_columns)
self.nest(pixel_columns, output_column='pixel')
column_specifiers.append(pixel_columns)
This is flexible enough for extending the column_candidates in a potential follow up.
Minimum acceptance criteria
auto detect columns if adhering to the internal column naming standard for preprocessed csv files
The text was updated successfully, but these errors were encountered:
Description of the problem
When working with local datasets we have to setup a bunch of different column names in the
DatasetDefinition
.It would be much nicer if standard column namings could be inferred.
Description of a solution
In some cases column names could be guessed. As a starting point we could reuse our internal standard for preprocessed files:
pymovements/src/pymovements/dataset/dataset_files.py
Lines 283 to 296 in cb9ef95
This would also very much simplify #714 as there's no need for an
auto_nest
argument then.So I would propose to add a new argument to the init, for instance:
The default could also be set to
True
but that could be a breaking change so I'm ambivalent.For each attribute, for example
pixel
, we would then write something like this:This is flexible enough for extending the
column_candidates
in a potential follow up.Minimum acceptance criteria
The text was updated successfully, but these errors were encountered: