Skip to content

Commit

Permalink
Merge pull request #45 from sensein/satra-patch-1
Browse files Browse the repository at this point in the history
Update demographics.py
  • Loading branch information
alistairewj authored Apr 23, 2024
2 parents 7cf9ba3 + ec1301a commit 9dc8419
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 9dc8419

Please sign in to comment.