Skip to content

Commit 1764785

Browse files
Julien RousselJulien Roussel
authored andcommitted
titanic dataset is not downloaded
1 parent 0b579e3 commit 1764785

File tree

4 files changed

+26
-22
lines changed

4 files changed

+26
-22
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
- name: Set up Python
16-
uses: actions/setup-python@v3
16+
uses: actions/setup-python@v3.12.0
1717
with:
1818
python-version: '3.10'
1919
- name: Install dependencies

AUTHORS.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Credits
55
Development Team
66
----------------
77

8-
* Julien Roussel <jroussel@quantmetry.com>
9-
* Anh Khoa Ngo Ho <angoho@quantmetry.com>
10-
* Charles-Henri Prat <chprat@quantmetry.com>
11-
* Guillaume Saës <gsaes@quantmetry.com>
8+
* Julien Roussel <julien.a.roussel@capgemini.com>
9+
* Anh Khoa Ngo Ho <anh-khoa.ngo-ho@capgemini.com>
10+
* Guillaume Saës <guillaume.saes@capgemini.com>
11+
* Yasser Zidani <yasser.zidani@capgemini.com>
1212

1313
Past Contributors
1414
-----------------
@@ -19,3 +19,4 @@ Past Contributors
1919
* Mikaïl Duran
2020
* Rima Hajou
2121
* Thomas Morzadec
22+
* Charles-Henri Prat

qolmat/imputations/preprocessing.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ def make_pipeline_mixte_preprocessing(
320320

321321
if avoid_new:
322322
preprocessor.steps.append(("bins", BinTransformer()))
323-
print(preprocessor)
324323
return preprocessor
325324

326325

qolmat/utils/data.py

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -119,21 +119,25 @@ def get_data(
119119
df = read_csv_local("conductors")
120120
return df
121121
elif name_data == "Titanic":
122-
df = read_csv_local("titanic", sep=";")
123-
df = df.dropna(how="all")
124-
df = df.drop(
125-
columns=[
126-
"pclass",
127-
"name",
128-
"home.dest",
129-
"cabin",
130-
"ticket",
131-
"boat",
132-
"body",
133-
]
134-
)
135-
df["age"] = pd.to_numeric(df["age"], errors="coerce")
136-
df["fare"] = pd.to_numeric(df["fare"].str.replace(",", ""), errors="coerce")
122+
# df = read_csv_local("titanic", sep=";")
123+
path = "https://gist.githubusercontent.com/fyyying/4aa5b471860321d7b47fd881898162b7/raw/"
124+
"6907bb3a38bfbb6fccf3a8b1edfb90e39714d14f/titanic_dataset.csv"
125+
df = pd.read_csv(path)
126+
# df = df.dropna(how="all")
127+
# df = df.drop(
128+
# columns=[
129+
# "pclass",
130+
# "name",
131+
# "home.dest",
132+
# "cabin",
133+
# "ticket",
134+
# "boat",
135+
# "body",
136+
# ]
137+
# )
138+
df = df[["Survived", "Sex", "Age", "SibSp", "Parch", "Fare", "Embarked"]]
139+
df["Age"] = pd.to_numeric(df["Age"], errors="coerce")
140+
df["Fare"] = pd.to_numeric(df["Fare"], errors="coerce")
137141
return df
138142
elif name_data == "Artificial":
139143
city = "Wonderland"

0 commit comments

Comments
 (0)