Skip to content

Commit c89d06e

Browse files
Update get.py
1 parent b93cc5c commit c89d06e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

braininventory/get.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,12 @@ def report():
103103
#The following block is a function that finds the number of rows that have 'true' under the key 'exists'.
104104
def __get_exists_true(df):
105105
return len(df[df['exists']== True]) #The true listed in the dataframe is the Boolean true value.
106-
exists_true = __get_exists_true(df) #This line assigns the returned value to a variable and print the value using the variable name.
107-
print(exists_true)
106+
print(__get_exists_true(df))
108107

109108
#The following block is a function that finds the number of total rows.
110109
def __get_exists_total(df):
111110
return len(df) #len counts the number of rows in the dataframe.
112-
exists_total = __get_exists_total(df) #The value of the total number of rows is now stored to the variable exists_total.
113-
print (exists_total)
111+
print(__get_exists_total(df))
114112

115113
#Now that we have the total number of exists and the total number of rows in the dataframe we can find the fraction of the total that exist using simple division.
116114
proportion = exists_true/exists_total

0 commit comments

Comments
 (0)