diff --git a/ciftify/bin/ciftify_atlas_report.py b/ciftify/bin/ciftify_atlas_report.py index 8b61d04..c868480 100755 --- a/ciftify/bin/ciftify_atlas_report.py +++ b/ciftify/bin/ciftify_atlas_report.py @@ -57,7 +57,7 @@ def report_atlas_overlap(df, label_data, atlas, surf_va_LR, min_percent_overlap # write an overlap report to the outputfile o_col = '{}_overlap'.format(atlas['name']) df[o_col] = "" - for pd_idx in df.index.get_values(): + for pd_idx in df.index.to_numpy(): df.loc[pd_idx, o_col] = ciftify.report.get_label_overlap_summary( pd_idx, label_data, atlas_data, atlas_dict, surf_va_LR, min_percent_overlap = min_percent_overlap) @@ -102,7 +102,7 @@ def run_ciftify_dlabel_report(arguments, tmpdir): # calculate a column of the surface area for row ROIs df['area'] = -999 - for pd_idx in df.index.get_values(): + for pd_idx in df.index.to_numpy(): df.loc[pd_idx, 'area'] = ciftify.report.calc_cluster_area(pd_idx, label_data, surf_va_LR) diff --git a/ciftify/bin/ciftify_statclust_report.py b/ciftify/bin/ciftify_statclust_report.py index c670c00..d873495 100755 --- a/ciftify/bin/ciftify_statclust_report.py +++ b/ciftify/bin/ciftify_statclust_report.py @@ -117,7 +117,7 @@ def report_atlas_overlap(df, label_data, atlas, surf_va_LR, min_percent_overlap # write an overlap report to the outputfile o_col = '{}_overlap'.format(atlas['name']) df[o_col] = "" - for pd_idx in df.index.get_values(): + for pd_idx in df.index.to_numpy(): df.loc[pd_idx, o_col] = ciftify.report.get_label_overlap_summary( pd_idx, label_data, atlas_data, atlas_dict, surf_va_LR, min_percent_overlap = min_percent_overlap) @@ -179,7 +179,7 @@ def run_ciftify_dlabel_report(arguments, tmpdir): # calculate a column of the surface area for row ROIs df['area'] = -999 - for pd_idx in df.index.get_values(): + for pd_idx in df.index.to_numpy(): df.loc[pd_idx, 'area'] = ciftify.report.calc_cluster_area(pd_idx, label_data, surf_va_LR) diff --git a/ciftify/report.py b/ciftify/report.py index a7053f3..041ec14 100644 --- a/ciftify/report.py +++ b/ciftify/report.py @@ -174,7 +174,7 @@ def calc_label_to_atlas_overlap(clust_id1, clust_atlas1_data, o_df = pd.DataFrame.from_dict(clust_atlas2_dict, orient = "index") o_df = o_df.rename(index=str, columns={0: "clusterID"}) - for idx_label2 in o_df.index.get_values(): + for idx_label2 in o_df.index.to_numpy(): o_df.loc[idx_label2, 'overlap_area'] = calc_overlapping_area(clust_id1, clust_atlas1_data, idx_label2, clust_atlas2, surf_va_array) return(o_df) @@ -184,7 +184,7 @@ def overlap_summary_string(overlap_df, min_percent_overlap): rdf = overlap_df[overlap_df.overlap_percent > min_percent_overlap] rdf = rdf.sort_values(by='overlap_percent', ascending=False) result_string = "" - for o_label in rdf.index.get_values(): + for o_label in rdf.index.to_numpy(): result_string += '{} ({:2.1f}%); '.format(rdf.loc[o_label, 'clusterID'], rdf.loc[o_label, 'overlap_percent']) return(result_string)