Skip to content

load_interventional_radiology_idb

Load and return the IDB interventional radiology 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
11
12
13
14
15
from msk_cdm.datasets import connect_to_db
from msk_cdm.datasets.impact import load_interventional_radiology_idb

# Connect to the database
auth_file = 'path/to/config.txt'
connect_to_db(auth_file=auth_file)

# Load the dataset
df_interventional_radiology = load_interventional_radiology_idb()

# Access the data
df = df_interventional_radiology['data']

# Display the first few rows of the data
print(df.head())
Source code in msk_cdm/datasets/phi/idb/datasets_phi_idb.py
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
def load_interventional_radiology_idb() -> Bunch:
    """Load and return the IDB interventional radiology 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_interventional_radiology_idb

    # Connect to the database
    auth_file = 'path/to/config.txt'
    connect_to_db(auth_file=auth_file)

    # Load the dataset
    df_interventional_radiology = load_interventional_radiology_idb()

    # Access the data
    df = df_interventional_radiology['data']

    # Display the first few rows of the data
    print(df.head())
    ```
    """
    df = _loader._load_phi_idb_interventional_radiology()
    data = Bunch(data=df)
    return data