Skip to content

load_radiation_idb

Load and return the IDB radiation 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_radiation_idb

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

# Load the dataset
df_radiation = load_radiation_idb()

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

# Display the first few rows of the data
print(df.head())
Source code in msk_cdm/datasets/phi/idb/datasets_phi_idb.py
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
def load_radiation_idb() -> Bunch:
    """Load and return the IDB radiation 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_radiation_idb

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

    # Load the dataset
    df_radiation = load_radiation_idb()

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

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