Skip to content

Commit

Permalink
appened is deprecated, changed to concat
Browse files Browse the repository at this point in the history
Former-commit-id: f6d997b
  • Loading branch information
fishingguy456 committed May 27, 2022
1 parent 3f01cd2 commit d604094
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions imgtools/utils/crawl.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,12 @@ def to_df(database_dict):
for study in database_dict[pat]:
for series in database_dict[pat][study]:
if series != 'description':
df = df.append({'patient_ID': pat,
'study': study,
'study_description': database_dict[pat][study]['description'],
'series': series,
'series_description': database_dict[pat][study][series]['description'],
'modality': database_dict[pat][study][series]['modality'],
'instances': len(database_dict[pat][study][series]['instances']),
'instance_uid': database_dict[pat][study][series]['instance_uid'],
'reference_ct': database_dict[pat][study][series]['reference_ct'],
'reference_rs': database_dict[pat][study][series]['reference_rs'],
'reference_pl': database_dict[pat][study][series]['reference_pl'],
'reference_frame': database_dict[pat][study][series]['reference_frame'],
'folder': database_dict[pat][study][series]['folder']}, ignore_index=True)
columns = ['patient_ID', 'study', 'study_description', 'series', 'series_description', 'modality', 'instances', 'instance_uid', 'reference_ct', 'reference_rs', 'reference_pl', 'reference_frame', 'folder']
values = [pat, study, database_dict[pat][study]['description'], series, database_dict[pat][study][series]['description'], database_dict[pat][study][series]['modality'], len(database_dict[pat][study][series]['instances']),
database_dict[pat][study][series]['instance_uid'], database_dict[pat][study][series]['reference_ct'], database_dict[pat][study][series]['reference_rs'], database_dict[pat][study][series]['reference_pl'],
database_dict[pat][study][series]['reference_frame'], database_dict[pat][study][series]['folder']]
df_add = pd.DataFrame([values], columns=columns)
df = pd.concat([df, df_add], ignore_index=True)
return df

def crawl(top,
Expand Down

0 comments on commit d604094

Please sign in to comment.