kleinay commited on
Commit
16a2218
·
verified ·
1 Parent(s): 3cbd500

Update qa_discourse.py

Browse files
Files changed (1) hide show
  1. qa_discourse.py +1 -1
qa_discourse.py CHANGED
@@ -142,7 +142,7 @@ class QaDiscourse(datasets.GeneratorBasedBuilder):
142
 
143
  # merge annotations from sections
144
  df = pd.concat([pd.read_csv(fn, sep='\t', on_bad_lines='skip') for fn in filepaths]).reset_index(drop=True)
145
- df = df.applymap(str) # must turn all values to strings explicitly to avoid type errors
146
  for counter, row in df.iterrows():
147
  # Prepare question (3 "slots" and question mark)
148
  question = [row.question_start, row.question_aux, row.question_body.rstrip('?'), '?']
 
142
 
143
  # merge annotations from sections
144
  df = pd.concat([pd.read_csv(fn, sep='\t', on_bad_lines='skip') for fn in filepaths]).reset_index(drop=True)
145
+ df = df.map(str) # must turn all values to strings explicitly to avoid type errors
146
  for counter, row in df.iterrows():
147
  # Prepare question (3 "slots" and question mark)
148
  question = [row.question_start, row.question_aux, row.question_body.rstrip('?'), '?']