Skip to content

Commit f0e266d

Browse files
committed
add LawSchoolAdmissionBar dataset
1 parent 8b737d1 commit f0e266d

File tree

6 files changed

+22459
-9
lines changed

6 files changed

+22459
-9
lines changed

datasets/__init__.py

Whitespace-only changes.

datasets/adult/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import pandas as pd
2+
from pathlib import Path
3+
import json
4+
5+
6+
data_folder = Path(__file__).resolve().parent / "data"
7+
dtypes_path = (data_folder / "dtypes.json")
8+
csv_path = str(data_folder / "adult.data")
9+
10+
11+
with dtypes_path.open('r') as f:
12+
dtypes = json.load(f)
13+
columns = list(dtypes.keys())
14+
df = pd.read_csv(csv_path, header=None, names=columns).astype(dtypes)

datasets/data/bar_pass_prediction.csv

Lines changed: 22408 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import pandas as pd
2+
from pathlib import Path
3+
import json
4+
5+
6+
data_folder = Path(__file__).resolve().parent / "data"
7+
dtypes_path = (data_folder / "dtypes.json")
8+
csv_path = str(data_folder / "bar_pass_prediction.csv")
9+
10+
11+
with dtypes_path.open('r') as f:
12+
dtypes = json.load(f)
13+
columns = list(dtypes.keys())
14+
df = pd.read_csv(csv_path, skiprows=1, sep=';', header=None, names=columns).astype(dtypes)

datasets/winequality/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import pandas as pd
2+
from pathlib import Path
3+
import json
4+
5+
6+
data_folder = Path(__file__).resolve().parent / "data"
7+
dtypes_path = (data_folder / "dtypes.json")
8+
csv_path = str(data_folder / "winequality-white.csv")
9+
10+
11+
with dtypes_path.open('r') as f:
12+
dtypes = json.load(f)
13+
columns = list(dtypes.keys())
14+
df = pd.read_csv(csv_path, skiprows=1, sep=';', header=None, names=columns).astype(dtypes)

notebook/CART_LawSchoolAdmissionBar.ipynb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 1,
5+
"execution_count": null,
66
"metadata": {},
77
"outputs": [],
88
"source": [
@@ -21,7 +21,7 @@
2121
},
2222
{
2323
"cell_type": "code",
24-
"execution_count": 2,
24+
"execution_count": null,
2525
"metadata": {},
2626
"outputs": [
2727
{
@@ -305,7 +305,7 @@
305305
},
306306
{
307307
"cell_type": "code",
308-
"execution_count": 48,
308+
"execution_count": null,
309309
"metadata": {},
310310
"outputs": [],
311311
"source": [
@@ -314,7 +314,7 @@
314314
},
315315
{
316316
"cell_type": "code",
317-
"execution_count": 49,
317+
"execution_count": null,
318318
"metadata": {},
319319
"outputs": [
320320
{
@@ -339,7 +339,7 @@
339339
},
340340
{
341341
"cell_type": "code",
342-
"execution_count": 50,
342+
"execution_count": null,
343343
"metadata": {},
344344
"outputs": [
345345
{
@@ -487,7 +487,7 @@
487487
},
488488
{
489489
"cell_type": "code",
490-
"execution_count": 12,
490+
"execution_count": null,
491491
"metadata": {},
492492
"outputs": [],
493493
"source": [
@@ -612,7 +612,7 @@
612612
},
613613
{
614614
"cell_type": "code",
615-
"execution_count": 13,
615+
"execution_count": null,
616616
"metadata": {},
617617
"outputs": [],
618618
"source": [
@@ -938,7 +938,7 @@
938938
},
939939
{
940940
"cell_type": "code",
941-
"execution_count": 14,
941+
"execution_count": null,
942942
"metadata": {},
943943
"outputs": [],
944944
"source": [
@@ -983,7 +983,7 @@
983983
},
984984
{
985985
"cell_type": "code",
986-
"execution_count": 16,
986+
"execution_count": null,
987987
"metadata": {},
988988
"outputs": [
989989
{

0 commit comments

Comments
 (0)