Skip to content

load_data_anchor_dates_phi

Load and return the anchor dates dataset (PHI).

Returns:

Name Type Description
data Bunch

Dictionary-like object, with the following attributes.

  • data : pandas DataFrame The data matrix.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from msk_cdm.datasets import connect_to_db
from msk_cdm.datasets.impact import load_data_anchor_dates_phi

auth_file = 'path/to/config.txt'
connect_to_db(auth_file=auth_file)

df_anchor_dates = load_data_anchor_dates_phi()
df = df_anchor_dates['data']

print(df.head())
Source code in msk_cdm/datasets/phi/impact/datasets_phi_impact.py
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
def load_data_anchor_dates_phi() -> Bunch:
    """Load and return the anchor dates dataset (PHI).

    Returns:
        data: Dictionary-like object, with the following attributes.

            - **data** : pandas DataFrame
                The data matrix.

    Examples
    --------
    ```python
    from msk_cdm.datasets import connect_to_db
    from msk_cdm.datasets.impact import load_data_anchor_dates_phi

    auth_file = 'path/to/config.txt'
    connect_to_db(auth_file=auth_file)

    df_anchor_dates = load_data_anchor_dates_phi()
    df = df_anchor_dates['data']

    print(df.head())
    ```
    """
    df = _loader._load_phi_impact_anchor_dates()
    data = Bunch(data=df)
    return data