Skip to content

load_data_timeline_tumor_sites_phi

Load and return the tumor sites 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_tumor_sites_phi

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

df_timeline_tumor_sites = load_data_timeline_tumor_sites_phi()
df = df_timeline_tumor_sites['data']

print(df.head())
Source code in msk_cdm/datasets/phi/impact/datasets_phi_impact.py
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
def load_data_timeline_tumor_sites_phi() -> Bunch:
    """Load and return the tumor sites 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_tumor_sites_phi

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

    df_timeline_tumor_sites = load_data_timeline_tumor_sites_phi()
    df = df_timeline_tumor_sites['data']

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