Load and return the MSK-IMPACT PD-L1 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_pdl1
# Connect to the database
auth_file = 'path/to/config.txt'
connect_to_db(auth_file=auth_file)
# Load the dataset
df_timeline_pdl1 = load_data_timeline_pdl1()
# Access the data
df_pdl1 = df_timeline_pdl1['data']
# Display the first few rows of the data
print(df_pdl1.head())
|
Source code in msk_cdm/datasets/impact/datasets_impact.py
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551 | def load_data_timeline_pdl1() -> Bunch:
"""Load and return the MSK-IMPACT PD-L1 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_pdl1
# Connect to the database
auth_file = 'path/to/config.txt'
connect_to_db(auth_file=auth_file)
# Load the dataset
df_timeline_pdl1 = load_data_timeline_pdl1()
# Access the data
df_pdl1 = df_timeline_pdl1['data']
# Display the first few rows of the data
print(df_pdl1.head())
```
"""
df = _loader._load_impact_data_timeline_pdl1()
output = Bunch(data=df)
return output
|