Skip to content

Commit

Permalink
Update demographics.py
Browse files Browse the repository at this point in the history
  • Loading branch information
satra authored Apr 19, 2024
1 parent 8846920 commit ec1301a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/b2aiprep/demographics.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def get_columns_of_repeat_instrument(repeat_instrument: RepeatInstrument) -> Lis

def get_df_of_repeat_instrument(df: DataFrame, repeat_instrument: RepeatInstrument) -> pd.DataFrame:
columns = get_columns_of_repeat_instrument(repeat_instrument)
if repeat_instrument in (RepeatInstrument.GENERIC_DEMOGRAPHICS, RepeatInstrument.PARTICIPANT):
if repeat_instrument in (RepeatInstrument.PARTICIPANT,):
idx = df['redcap_repeat_instrument'].isnull()
else:
idx = df['redcap_repeat_instrument'] == repeat_instrument.value
Expand Down Expand Up @@ -143,4 +143,4 @@ def load_features_for_recordings(df: pd.DataFrame, data_path: Path, feature: Opt
if feature is not None:
output[recording_id] = output[recording_id][feature]

return output
return output

0 comments on commit ec1301a

Please sign in to comment.