Load and return the MSK-IMPACT MMR timeline dataset (deidentified).
Returns:
Name | Type |
Description |
data |
Bunch
|
Dictionary-like object, with the following attributes.
- data : pandas DataFrame
The data matrix.
- description_columns : list
The names of the dataset columns. (Future release)
- description_dataset : str
The full description of the dataset. (Future release)
- filename : str
The path to the location of the data. (Future release)
|
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_mmr
# Connect to the database
auth_file = 'path/to/config.txt'
connect_to_db(auth_file=auth_file)
# Load the dataset
df_timeline_mmr = load_data_timeline_mmr()
# Access the data
df_mmr = df_timeline_mmr['data']
# Display the first few rows of the data
print(df_mmr.head())
|
Source code in msk_cdm/datasets/impact/datasets_impact.py
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590 | def load_data_timeline_mmr() -> Bunch:
"""Load and return the MSK-IMPACT MMR timeline dataset (deidentified).
Returns:
data: Dictionary-like object, with the following attributes.
- **data** : pandas DataFrame
The data matrix.
- **description_columns** : list
The names of the dataset columns. (Future release)
- **description_dataset** : str
The full description of the dataset. (Future release)
- **filename** : str
The path to the location of the data. (Future release)
Examples
--------
```python
from msk_cdm.datasets import connect_to_db
from msk_cdm.datasets.impact import load_data_timeline_mmr
# Connect to the database
auth_file = 'path/to/config.txt'
connect_to_db(auth_file=auth_file)
# Load the dataset
df_timeline_mmr = load_data_timeline_mmr()
# Access the data
df_mmr = df_timeline_mmr['data']
# Display the first few rows of the data
print(df_mmr.head())
```
"""
df = _loader._load_impact_data_timeline_mmr()
output = Bunch(data=df)
return output
|