We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eefec85 commit 69b99f5Copy full SHA for 69b99f5
braininventory/get.py
@@ -3,6 +3,16 @@
3
import json
4
from datetime import date
5
6
+def get_jsonFile(df):
7
+ """
8
+ Input: dataframe
9
+ Expected Output: link that opens the jsonFile that was located in the randomly chosen row
10
+ Current Output: broken link resulting in Error 404 on the webpage
11
12
+ isNotZero = df[df["score"] != 0.0] #only select rows != 0
13
+ randomRow = isNotZero.iloc[random.randint(0, len(isNotZero))] #select a random row of random index bt 0 and len of isNotZero
14
+ jsonFile = randomRow.json_file.replace("/bil/data", "https://brainimagelibrary.org", 1) #replace (/bil/data) from the json_file
15
+ print(jsonFile) #ERROR 404
16
17
def today():
18
"""
0 commit comments