Skip to content

Commit

Permalink
update t1
Browse files Browse the repository at this point in the history
  • Loading branch information
tompollard committed Feb 5, 2018
1 parent 7c5c3e6 commit ff5ec43
Showing 1 changed file with 70 additions and 70 deletions.
140 changes: 70 additions & 70 deletions notebooks/tableone-demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# Run query and assign the results to a Pandas DataFrame\n",
Expand Down Expand Up @@ -157,18 +159,27 @@
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" .dataframe thead tr th {\n",
" text-align: left;\n",
" }\n",
"\n",
" .dataframe thead tr:last-of-type th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <tr>\n",
" <th></th>\n",
" <th></th>\n",
" <th colspan=\"3\" halign=\"left\">Grouped by admission_type</th>\n",
" </tr>\n",
" <tr>\n",
" <th></th>\n",
" <th></th>\n",
" <th>admission_type=ELECTIVE</th>\n",
" <th>admission_type=EMERGENCY</th>\n",
" <th>admission_type=URGENT</th>\n",
" <th>ELECTIVE</th>\n",
" <th>EMERGENCY</th>\n",
" <th>URGENT</th>\n",
" </tr>\n",
" <tr>\n",
" <th>variable</th>\n",
Expand Down Expand Up @@ -307,71 +318,51 @@
"</div>"
],
"text/plain": [
" admission_type=ELECTIVE \\\n",
"variable level \n",
"n 8 \n",
"age 74.23 (11.05) \n",
"ethnicity WHITE 8 (100.0) \n",
" UNKNOWN/NOT SPECIFIED \n",
" BLACK/AFRICAN AMERICAN \n",
"gender F 5 (62.5) \n",
" M 3 (37.5) \n",
"hospital_expire_flag 0 8 (100.0) \n",
" 1 \n",
"insurance Medicare 5 (62.5) \n",
" Private 3 (37.5) \n",
" Medicaid \n",
"los_hospital 11.67 (11.79) \n",
"marital_status MARRIED 4 (50.0) \n",
" SINGLE 2 (25.0) \n",
" WIDOWED 1 (12.5) \n",
"religion CATHOLIC 6 (75.0) \n",
" UNOBTAINABLE \n",
" NOT SPECIFIED 1 (12.5) \n",
"\n",
" admission_type=EMERGENCY \\\n",
"variable level \n",
"n 90 \n",
"age 90.01 (68.12) \n",
"ethnicity WHITE 65 (72.22) \n",
" UNKNOWN/NOT SPECIFIED 9 (10.0) \n",
" BLACK/AFRICAN AMERICAN 6 (6.67) \n",
"gender F 48 (53.33) \n",
" M 42 (46.67) \n",
"hospital_expire_flag 0 58 (64.44) \n",
" 1 32 (35.56) \n",
"insurance Medicare 70 (77.78) \n",
" Private 15 (16.67) \n",
" Medicaid 4 (4.44) \n",
"los_hospital 9.86 (14.43) \n",
"marital_status MARRIED 36 (48.0) \n",
" SINGLE 18 (24.0) \n",
" WIDOWED 13 (17.33) \n",
"religion CATHOLIC 33 (37.08) \n",
" UNOBTAINABLE 16 (17.98) \n",
" NOT SPECIFIED 14 (15.73) \n",
" Grouped by admission_type \\\n",
" ELECTIVE \n",
"variable level \n",
"n 8 \n",
"age 74.23 (11.05) \n",
"ethnicity WHITE 8 (100.0) \n",
" UNKNOWN/NOT SPECIFIED \n",
" BLACK/AFRICAN AMERICAN \n",
"gender F 5 (62.5) \n",
" M 3 (37.5) \n",
"hospital_expire_flag 0 8 (100.0) \n",
" 1 \n",
"insurance Medicare 5 (62.5) \n",
" Private 3 (37.5) \n",
" Medicaid \n",
"los_hospital 11.67 (11.79) \n",
"marital_status MARRIED 4 (50.0) \n",
" SINGLE 2 (25.0) \n",
" WIDOWED 1 (12.5) \n",
"religion CATHOLIC 6 (75.0) \n",
" UNOBTAINABLE \n",
" NOT SPECIFIED 1 (12.5) \n",
"\n",
" admission_type=URGENT \n",
"variable level \n",
"n 2 \n",
"age 75.66 (4.29) \n",
"ethnicity WHITE 1 (50.0) \n",
" UNKNOWN/NOT SPECIFIED 1 (50.0) \n",
" BLACK/AFRICAN AMERICAN \n",
"gender F 2 (100.0) \n",
" M \n",
"hospital_expire_flag 0 1 (50.0) \n",
" 1 1 (50.0) \n",
"insurance Medicare 1 (50.0) \n",
" Private 1 (50.0) \n",
" Medicaid \n",
"los_hospital 6.26 (0.81) \n",
"marital_status MARRIED 1 (50.0) \n",
" SINGLE \n",
" WIDOWED \n",
"religion CATHOLIC \n",
" UNOBTAINABLE \n",
" NOT SPECIFIED "
" \n",
" EMERGENCY URGENT \n",
"variable level \n",
"n 90 2 \n",
"age 90.01 (68.12) 75.66 (4.29) \n",
"ethnicity WHITE 65 (72.22) 1 (50.0) \n",
" UNKNOWN/NOT SPECIFIED 9 (10.0) 1 (50.0) \n",
" BLACK/AFRICAN AMERICAN 6 (6.67) \n",
"gender F 48 (53.33) 2 (100.0) \n",
" M 42 (46.67) \n",
"hospital_expire_flag 0 58 (64.44) 1 (50.0) \n",
" 1 32 (35.56) 1 (50.0) \n",
"insurance Medicare 70 (77.78) 1 (50.0) \n",
" Private 15 (16.67) 1 (50.0) \n",
" Medicaid 4 (4.44) \n",
"los_hospital 9.86 (14.43) 6.26 (0.81) \n",
"marital_status MARRIED 36 (48.0) 1 (50.0) \n",
" SINGLE 18 (24.0) \n",
" WIDOWED 13 (17.33) \n",
"religion CATHOLIC 33 (37.08) \n",
" UNOBTAINABLE 16 (17.98) \n",
" NOT SPECIFIED 14 (15.73) "
]
},
"execution_count": 6,
Expand Down Expand Up @@ -405,6 +396,15 @@
"\n",
"t.tableone"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit ff5ec43

Please sign in to comment.