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

feat: add "id" column to Titanic dataset #29

Merged
merged 1 commit into from
Mar 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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