Skip to content

Commit

Permalink
Merge branch 'main' into sim
Browse files Browse the repository at this point in the history
  • Loading branch information
jjau authored Apr 26, 2024
2 parents 3548eec + b23b2f3 commit 0ad8fa1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/palin/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def compute_prob_agreement(data_df, session_identifiers=['experimentor', 'type',
trial_responses_df = trial_responses_df.join(trial_responses_df[response_identifier].str.split(expand=True).rename(columns={0: '%s1' % response_identifier, 1: '%s2' % response_identifier}))

#clean the response data by removing any non-numeric characters
trial_responses_df['%s1' % response_identifier] = trial_responses_df['%s1' % response_identifier].str.replace(r'\D', '', regex=True))
trial_responses_df['%s2' % response_identifier] = trial_responses_df['%s2' % response_identifier].str.replace(r'\D', '', regex=True))
trial_responses_df['%s1' % response_identifier] = trial_responses_df['%s1' % response_identifier].str.replace(r'\D', '', regex=True)
trial_responses_df['%s2' % response_identifier] = trial_responses_df['%s2' % response_identifier].str.replace(r'\D', '', regex=True)

# drop the original response column
trial_responses_df = trial_responses_df.drop(columns=[response_identifier])
Expand Down

0 comments on commit 0ad8fa1

Please sign in to comment.