Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: set log level to error #28

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
9 changes: 9 additions & 0 deletions docs/examples/disable_warnings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import logging
import warnings


def disable_warnings() -> None:
"""Disable output of warnings."""

logging.root.setLevel(logging.ERROR)
warnings.filterwarnings("ignore")
67 changes: 16 additions & 51 deletions docs/examples/house_sales.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
"The dataset contains house sale prices for King County, USA between May 2014 and May 2015. It is well suited to practice regression techniques."
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
Expand All @@ -20,19 +17,17 @@
"## Column descriptions"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"import warnings\n",
"warnings.filterwarnings(\"ignore\")\n",
"from disable_warnings import disable_warnings\n",
"\n",
"disable_warnings()\n",
"\n",
"from safeds_examples.tabular import describe_house_sales_columns\n",
"from display_column_description import display_column_descriptions\n",
Expand All @@ -41,10 +36,7 @@
"display_column_descriptions(house_sales_description)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
Expand All @@ -53,10 +45,7 @@
"## Sample"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
Expand All @@ -70,10 +59,7 @@
"house_sales.slice(end=10)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
Expand All @@ -82,10 +68,7 @@
"## Schema"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
Expand All @@ -96,10 +79,7 @@
"house_sales.schema"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
Expand All @@ -108,10 +88,7 @@
"## Statistics"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
Expand All @@ -122,10 +99,7 @@
"house_sales.summary()"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
Expand All @@ -134,10 +108,7 @@
"## Correlation heatmap"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
Expand All @@ -159,10 +130,7 @@
"correlation_heatmap(house_sales_correlation)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
Expand All @@ -175,10 +143,7 @@
"Column descriptions are based on [this Kaggle discussion](https://www.kaggle.com/datasets/harlfoxem/housesalesprediction/discussion/207885).\n"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
}
],
Expand All @@ -203,4 +168,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
67 changes: 16 additions & 51 deletions docs/examples/titanic.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
"The dataset contains information about the passengers of the Titanic and whether they survived the accident. It is well suited to practice classification techniques."
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
Expand All @@ -20,19 +17,17 @@
"## Column descriptions"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
"cell_type": "code",
"execution_count": null,
"outputs": [],
"source": [
"import warnings\n",
"warnings.filterwarnings(\"ignore\")\n",
"from disable_warnings import disable_warnings\n",
"\n",
"disable_warnings()\n",
"\n",
"from safeds_examples.tabular import describe_titanic_columns\n",
"from display_column_description import display_column_descriptions\n",
Expand All @@ -41,10 +36,7 @@
"display_column_descriptions(titanic_description)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
Expand All @@ -53,10 +45,7 @@
"## Sample"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
Expand All @@ -70,10 +59,7 @@
"titanic.slice(end=10)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
Expand All @@ -82,10 +68,7 @@
"## Schema"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
Expand All @@ -96,10 +79,7 @@
"titanic.schema"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
Expand All @@ -108,10 +88,7 @@
"## Statistics"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
Expand All @@ -122,10 +99,7 @@
"titanic.summary()"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
Expand All @@ -134,10 +108,7 @@
"## Correlation heatmap"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
},
{
Expand All @@ -154,10 +125,7 @@
"correlation_heatmap(titanic_correlation)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
"collapsed": false
}
},
{
Expand All @@ -172,10 +140,7 @@
"> Thomas Cason of UVa has greatly updated and improved the titanic data frame using the Encyclopedia Titanica and created the dataset here. Some duplicate passengers have been dropped, many errors corrected, many missing ages filled in, and new variables created.\n"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%% md\n"
}
"collapsed": false
}
}
],
Expand All @@ -200,4 +165,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}