Skip to content

Commit

Permalink
feat: add "id" column to Titanic dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-reimann committed Mar 17, 2023
1 parent 53fc7ec commit cbf46cd
Show file tree
Hide file tree
Showing 4 changed files with 1,320 additions and 1,314 deletions.
12 changes: 8 additions & 4 deletions docs/examples/titanic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,16 @@
"execution_count": null,
"outputs": [],
"source": [
"from safeds.data.tabular import Table\n",
"from safeds.plotting import correlation_heatmap\n",
"\n",
"titanic_correlation = Table.from_columns(\n",
" titanic.list_columns_with_numerical_values()\n",
")\n",
"titanic_correlation = titanic.keep_columns([\n",
" \"age\",\n",
" \"siblings_spouses\",\n",
" \"parents_children\",\n",
" \"travel_class\",\n",
" \"fare\",\n",
" \"survived\"\n",
"])\n",
"correlation_heatmap(titanic_correlation)"
],
"metadata": {
Expand Down
1 change: 1 addition & 0 deletions src/safeds_examples/tabular/_titanic/_titanic.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def describe_titanic_columns() -> Table:

return Table(
[
{"Name": "id", "Description": "A unique identifier"},
{"Name": "name", "Description": "Name of the passenger"},
{"Name": "sex", "Description": "Sex of the passenger"},
{"Name": "age", "Description": "Age of the passenger at the time of the accident"},
Expand Down
Loading

0 comments on commit cbf46cd

Please sign in to comment.