From fbb8dd48824837378ad70809bb6f4ffe8b7df15b Mon Sep 17 00:00:00 2001 From: Martin Trat Date: Wed, 21 Sep 2022 21:34:50 +0200 Subject: [PATCH] Move datasets and write simple loader --- fcbf/data/__init__.py | 2 ++ fcbf/data/datasets.py | 8 ++++++++ {data => fcbf/data}/lung-cancer.data | 0 3 files changed, 10 insertions(+) create mode 100644 fcbf/data/__init__.py create mode 100644 fcbf/data/datasets.py rename {data => fcbf/data}/lung-cancer.data (100%) diff --git a/fcbf/data/__init__.py b/fcbf/data/__init__.py new file mode 100644 index 0000000..b6948ba --- /dev/null +++ b/fcbf/data/__init__.py @@ -0,0 +1,2 @@ + +from .datasets import lung_cancer diff --git a/fcbf/data/datasets.py b/fcbf/data/datasets.py new file mode 100644 index 0000000..5b30408 --- /dev/null +++ b/fcbf/data/datasets.py @@ -0,0 +1,8 @@ + +import pathlib + +import pandas as pd + + +_lung_cancer_path = pathlib.Path(__file__).parent.joinpath('lung-cancer.data') +lung_cancer = pd.read_csv(_lung_cancer_path, header=None, na_values='?') diff --git a/data/lung-cancer.data b/fcbf/data/lung-cancer.data similarity index 100% rename from data/lung-cancer.data rename to fcbf/data/lung-cancer.data