1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
use crateDataset;
use crateChartonError;
/// Load built-in datasets.
///
/// Based on the passed dataset name `dataset`, returns the corresponding `Dataset` or an error.
///
/// # Arguments
///
/// - `dataset`: Dataset name, supporting the following options:
/// - `"mtcars"`: Motor trend car road tests dataset (32 rows × 12 columns)
/// - `"iris"`: Edgar Anderson's Iris Data (150 rows × 5 columns)
/// - `"mpg"`: Subset of first 10 rows from UCI Auto MPG dataset
/// - `"nightingale"`: Dataset for Florence Nightingale's famous polar area diagram.
/// - `"penguins"`: Detaset that includes data points across a sample size of 344 penguins (344 rows × 7 columns).
///
/// # Returns
///
/// On success, returns a `Dataset` containing the specified dataset content;
/// on failure, returns a `ChartonError`.
///
/// # Examples
///
/// ```rust,ignore
/// let df = load_dataset("mtcars")?;
/// ```