Load and return the prior medications timeline dataset (PHI).
Returns:
Name | Type |
Description |
data |
Bunch
|
Dictionary-like object, with the following attributes.
- data : pandas DataFrame
The data matrix.
|
Examples
| from msk_cdm.datasets import connect_to_db
from msk_cdm.datasets.impact import load_data_timeline_prior_meds_phi
auth_file = 'path/to/config.txt'
connect_to_db(auth_file=auth_file)
df_timeline_prior_meds = load_data_timeline_prior_meds_phi()
df = df_timeline_prior_meds['data']
print(df.head())
|
Source code in msk_cdm/datasets/phi/impact/datasets_phi_impact.py
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256 | def load_data_timeline_prior_meds_phi() -> Bunch:
"""Load and return the prior medications 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_prior_meds_phi
auth_file = 'path/to/config.txt'
connect_to_db(auth_file=auth_file)
df_timeline_prior_meds = load_data_timeline_prior_meds_phi()
df = df_timeline_prior_meds['data']
print(df.head())
```
"""
df = _loader._load_phi_impact_data_timeline_prior_meds()
data = Bunch(data=df)
return data
|