Skip to content

load_data_timeline_gleason_phi

Load and return the Gleason score timeline 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_timeline_gleason_phi

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

df_timeline_gleason = load_data_timeline_gleason_phi()
df = df_timeline_gleason['data']

print(df.head())
Source code in msk_cdm/datasets/phi/impact/datasets_phi_impact.py
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
def load_data_timeline_gleason_phi() -> Bunch:
    """Load and return the Gleason score timeline 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_timeline_gleason_phi

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

    df_timeline_gleason = load_data_timeline_gleason_phi()
    df = df_timeline_gleason['data']

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