File tree Expand file tree Collapse file tree
src/mindlogger_data_export Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -527,13 +527,30 @@ def _prepare_activity_columns(
527527 col .replace ("_index" , "" ) for col in df .columns if col .endswith ("_index" )
528528 }
529529
530+ df = df .rename (
531+ {
532+ col : col .replace (
533+ f"{ activity_prefix } _response_response_" , f"{ activity_prefix } _"
534+ ).replace ("_response_response_" , "_" )
535+ + "_response"
536+ for col in df .columns
537+ if f"{ activity_prefix } _response_response_" in col
538+ }
539+ ).rename (
540+ {
541+ col : col .replace (
542+ f"{ activity_prefix } _response_value_" , f"{ activity_prefix } _"
543+ ).replace ("_response_value_" , "_" )
544+ + "_score"
545+ for col in df .columns
546+ if f"{ activity_prefix } _response_value_" in col
547+ }
548+ )
530549 return df .select (
531550 [
532551 col
533552 for col in df .columns
534553 if col not in (response_bases | score_bases | index_bases )
535- and not col .startswith (f"{ activity_prefix } _response_response_" )
536- and not col .startswith (f"{ activity_prefix } _response_value_" )
537554 ]
538555 )
539556
You can’t perform that action at this time.
0 commit comments