Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

Commit cbf46cd

Browse files
committed
feat: add "id" column to Titanic dataset
1 parent 53fc7ec commit cbf46cd

File tree

4 files changed

+1320
-1314
lines changed

4 files changed

+1320
-1314
lines changed

docs/examples/titanic.ipynb

+8-4
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,16 @@
116116
"execution_count": null,
117117
"outputs": [],
118118
"source": [
119-
"from safeds.data.tabular import Table\n",
120119
"from safeds.plotting import correlation_heatmap\n",
121120
"\n",
122-
"titanic_correlation = Table.from_columns(\n",
123-
" titanic.list_columns_with_numerical_values()\n",
124-
")\n",
121+
"titanic_correlation = titanic.keep_columns([\n",
122+
" \"age\",\n",
123+
" \"siblings_spouses\",\n",
124+
" \"parents_children\",\n",
125+
" \"travel_class\",\n",
126+
" \"fare\",\n",
127+
" \"survived\"\n",
128+
"])\n",
125129
"correlation_heatmap(titanic_correlation)"
126130
],
127131
"metadata": {

src/safeds_examples/tabular/_titanic/_titanic.py

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def describe_titanic_columns() -> Table:
3131

3232
return Table(
3333
[
34+
{"Name": "id", "Description": "A unique identifier"},
3435
{"Name": "name", "Description": "Name of the passenger"},
3536
{"Name": "sex", "Description": "Sex of the passenger"},
3637
{"Name": "age", "Description": "Age of the passenger at the time of the accident"},

0 commit comments

Comments
 (0)