This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import numpy as np | |
def load_data(fname, as_dict=True): | |
if as_dict: | |
data_dict = pd.read_csv( | |
fname | |
).to_dict(orient='list') # dictionary of lists of columns | |
return data_dict | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
def load_data(fname): | |
data_dict = pd.read_csv( | |
"table4.csv" | |
).to_dict(orient='list') # dictionary of lists of columns | |
return data_dict | |
def check_missing(data, column): | |
"""Count missing values per column.""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subject_id | age | sex | group | reaction_time_ms | accuracy_pct | working_memory_span | fmri_activation_dlpfc | fmri_connectivity_dmnpfc | clinical_score | |
---|---|---|---|---|---|---|---|---|---|---|
S001 | 58 | M | Control | 472 | 91.3 | 8 | 0.53 | 0.37 | 1 | |
S002 | 48 | F | Control | 575 | 93.1 | 8 | 0.4 | 0.27 | 1 | |
S003 | 34 | M | Control | 551 | 90.1 | 7 | 0.4 | 0.26 | 2 | |
S004 | 62 | F | Patient | 731 | 81.3 | 6 | 0.28 | 0.2 | 29 | |
S005 | 27 | F | Control | 454 | 90.1 | 7 | 0.41 | 0.27 | 4 | |
S006 | 40 | F | Patient | 808 | 74.5 | 3 | 0.31 | 0.2 | 16 | |
S007 | 58 | M | Control | 535 | 88.4 | 6 | 0.37 | 0.31 | 4 | |
S008 | 38 | M | Control | 522 | 98.1 | 7 | 0.37 | 0.22 | 0 | |
S009 | 42 | M | Control | 565 | 93.5 | 6 | 0.4 | 0.38 | 5 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ |
NewerOlder