You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: braininventory/get.py
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -103,14 +103,12 @@ def report():
103
103
#The following block is a function that finds the number of rows that have 'true' under the key 'exists'.
104
104
def__get_exists_true(df):
105
105
returnlen(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))
108
107
109
108
#The following block is a function that finds the number of total rows.
110
109
def__get_exists_total(df):
111
110
returnlen(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))
114
112
115
113
#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.
0 commit comments