From 46fa7372757ccd291e1b178b4e127754575a7d2d Mon Sep 17 00:00:00 2001 From: Jerome Dockes Date: Mon, 15 Jan 2024 15:00:03 +0100 Subject: [PATCH] detail --- doc/make_doc.py | 22 +++++++++++++++++++--- src/skrubview/_data/templates/base.css | 1 + 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/doc/make_doc.py b/doc/make_doc.py index b6d3ed6..f7900a7 100755 --- a/doc/make_doc.py +++ b/doc/make_doc.py @@ -3,7 +3,8 @@ import shutil from pathlib import Path -from skrub import datasets +from skrub import datasets as skrub_data +from sklearn import datasets as sklearn_data from skrubview import Report @@ -15,11 +16,26 @@ reports_dir = build_dir / "reports" reports_dir.mkdir() -dataset_names = [ +skrub_dataset_names = [ "employee_salaries", "medical_charge", ] -datasets = [(getattr(datasets, f"fetch_{name}")().X, name) for name in dataset_names] +datasets = [ + (getattr(skrub_data, f"fetch_{name}")().X, name) for name in skrub_dataset_names +] + +sklearn_dataset_names = ["titanic"] +datasets.extend( + [ + ( + sklearn_data.fetch_openml( + name, as_frame=True, parser="auto", version=1 + ).frame, + name, + ) + for name in sklearn_dataset_names + ] +) def add_report(df, name): diff --git a/src/skrubview/_data/templates/base.css b/src/skrubview/_data/templates/base.css index 861206e..42c2e79 100644 --- a/src/skrubview/_data/templates/base.css +++ b/src/skrubview/_data/templates/base.css @@ -180,6 +180,7 @@ max-height: 10rem; min-height: 1rem; overflow: auto; + white-space: nowrap; } {{ report_id_selector }}.skrubview-report .skrubview-table-value-box {