Skip to content

Commit 46f3635

Browse files
authored
Merge pull request #29 from brain-image-library/28-frequency-of-projects
Update get.py
2 parents 34b1a23 + 26a1442 commit 46f3635

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

braininventory/get.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,24 @@ def report():
100100

101101
return report
102102

103+
#
104+
def __get_list_of_projects(df):
105+
'''
106+
Get the list of names for unique projects
107+
108+
Input parameter: dataframe
109+
Output: list of projects
110+
'''
111+
112+
return df['project'].unique().to_dict()
113+
114+
#
115+
def __get_number_of_projects(df):
116+
'''
117+
Get the number of unique projects
118+
119+
Input parameter: dataframe
120+
Output: number of projects
121+
'''
122+
123+
return len(df['project'].unique())

0 commit comments

Comments
 (0)