Skip to content

Commit 187596b

Browse files
authored
Update get.py
1 parent 28be05f commit 187596b

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

braininventory/get.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,23 @@ def __get__percentage_of_metadata_version_1(df):
160160
Get the percentage/ratio of metadata version 1 from all datasets
161161
162162
Input: dataframe
163-
Output: an integer
163+
Output: a float
164164
"""
165165
return len(df[df["metadata_version"] == 1]) / len(df)
166166

167167

168+
def __get__metadata_version_2(df):
169+
170+
"""
171+
Get the percentage/ratio of metadata version 1 from all datasets
172+
173+
Input: dataframe
174+
Output: a float
175+
"""
176+
177+
return len(df[df['metadata_version'] == 2]) / len(df)
178+
179+
168180
def report():
169181
# Get today's date
170182
tdate = date.today()

0 commit comments

Comments
 (0)