Load and return the MSK-IMPACT follow-up 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_follow_up
# Connect to the database
auth_file = 'path/to/config.txt'
connect_to_db(auth_file=auth_file)
# Load the dataset
df_timeline_follow_up = load_data_timeline_follow_up()
# Access the data
df_follow_up = df_timeline_follow_up['data']
# Display the first few rows of the data
print(df_follow_up.head())
|
Source code in msk_cdm/datasets/impact/datasets_impact.py
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707 | def load_data_timeline_follow_up() -> Bunch:
"""Load and return the MSK-IMPACT follow-up 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_follow_up
# Connect to the database
auth_file = 'path/to/config.txt'
connect_to_db(auth_file=auth_file)
# Load the dataset
df_timeline_follow_up = load_data_timeline_follow_up()
# Access the data
df_follow_up = df_timeline_follow_up['data']
# Display the first few rows of the data
print(df_follow_up.head())
```
"""
df = _loader._load_impact_data_timeline_follow_up()
output = Bunch(data=df)
return output
|