Load and return the MSK-IMPACT diagnosis timeline dataset (deidentified).
Returns:
Name | Type |
Description |
data |
Bunch
|
Dictionary-like object, with the following attributes.
- data : pandas DataFrame
The data matrix.
- description_columns (Future release) : list
The names of the dataset columns.
- description_dataset (Future release) : str
The full description of the dataset.
- filename (Future release) : str
The path to the location of the data.
|
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_data_timeline_diagnosis
# Connect to the database
auth_file = 'path/to/config.txt'
connect_to_db(auth_file=auth_file)
# Load the dataset
df_timeline_diagnosis = load_data_timeline_diagnosis()
# Access the data
df_diag = df_timeline_diagnosis['data']
# Display the first few rows of the data
print(df_diag.head())
|
Source code in msk_cdm/datasets/impact/datasets_impact.py
201
202
203
204
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
237
238 | def load_data_timeline_diagnosis() -> Bunch:
"""Load and return the MSK-IMPACT diagnosis timeline dataset (deidentified).
Returns:
data : Dictionary-like object, with the following attributes.
- **data** : pandas DataFrame
The data matrix.
- **description_columns** (Future release) : list
The names of the dataset columns.
- **description_dataset** (Future release) : str
The full description of the dataset.
- **filename** (Future release) : str
The path to the location of the data.
Examples
--------
```python
from msk_cdm.datasets import connect_to_db
from msk_cdm.datasets.impact import load_data_timeline_diagnosis
# Connect to the database
auth_file = 'path/to/config.txt'
connect_to_db(auth_file=auth_file)
# Load the dataset
df_timeline_diagnosis = load_data_timeline_diagnosis()
# Access the data
df_diag = df_timeline_diagnosis['data']
# Display the first few rows of the data
print(df_diag.head())
```
"""
df = _loader._load_impact_data_timeline_diagnosis()
output = Bunch(data=df)
return output
|