store all the scan_params dictionaries in a list
@@ -384,7 +384,7 @@ def expected_file_check(layout, config):
"""
- summary_df = pd.DataFrame(columns=['subject', 'session', 'modality', 'task', 'runs', 'runs_found', 'problem'])
+ dictlist = []
with open(config) as f:
json_data = json.load(f)
subjects = layout.get_subjects()
@@ -399,7 +399,8 @@ def expected_file_check(layout, config):
scan_params['problem'] = True
else:
scan_params['problem'] = False
- summary_df = summary_df.append(scan_params, ignore_index=True)
+ dictlist.append(scan_params)
print('sub {:}: done'.format(sub))
+ summary_df = pd.DataFrame(dictlist)
problem_df = summary_df.loc[summary_df['problem'] == True]
return summary_df, problem_df
\ No newline at end of file
