Skip to content
Open
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
28 changes: 21 additions & 7 deletions examples/popmon_dp_loader_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,24 @@
"except ImportError:\n",
" import dataprofiler as dp\n",
"import pandas as pd\n",
"import popmon # noqa"
"import popmon # noqa\n",
"\n",
"from popmon import Settings\n",
"\n",
"\n",
"def make_settings(time_axis):\n",
" \"\"\"Create popmon Settings with our custom config (popmon 1.0+ API).\n",
"\n",
" A fresh Settings is needed for each pm_stability_report call because\n",
" settings.bin_specs gets mutated on each call. The time_axis must be set\n",
" on settings; the time_axis kwarg to pm_stability_report is ignored when\n",
" settings is provided.\n",
" \"\"\"\n",
" s = Settings()\n",
" s.time_axis = time_axis\n",
" s.report.extended_report = False\n",
" s.monitoring.monitoring_rules = {\"*_pull\": [10, 7, -7, -10]}\n",
" return s"
]
},
{
Expand Down Expand Up @@ -204,8 +221,7 @@
" time_axis=time_index,\n",
" time_width=\"1w\",\n",
" time_offset=\"2015-07-02\",\n",
" extended_report=False,\n",
" pull_rules={\"*_pull\": [10, 7, -7, -10]},\n",
" settings=make_settings(time_index),\n",
")\n",
"\n",
"# Save popmon reports\n",
Expand Down Expand Up @@ -234,8 +250,7 @@
" time_axis=time_index,\n",
" time_width=\"1w\",\n",
" time_offset=\"2015-07-02\",\n",
" extended_report=False,\n",
" pull_rules={\"*_pull\": [10, 7, -7, -10]},\n",
" settings=make_settings(time_index),\n",
")\n",
"\n",
"# Save popmon reports\n",
Expand Down Expand Up @@ -366,8 +381,7 @@
" time_axis=time_index,\n",
" time_width=\"1w\",\n",
" time_offset=\"2015-07-02\",\n",
" extended_report=False,\n",
" pull_rules={\"*_pull\": [10, 7, -7, -10]},\n",
" settings=make_settings(time_index),\n",
")"
]
},
Expand Down