Load and return the MSK-IMPACT specimen 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_specimen
# Connect to the database
auth_file = 'path/to/config.txt'
connect_to_db(auth_file=auth_file)
# Load the dataset
df_timeline_specimen = load_data_timeline_specimen()
# Access the data
df_spec = df_timeline_specimen['data']
# Display the first few rows of the data
print(df_spec.head())
|
Source code in msk_cdm/datasets/impact/datasets_impact.py
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434 | def load_data_timeline_specimen() -> Bunch:
"""Load and return the MSK-IMPACT specimen 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_specimen
# Connect to the database
auth_file = 'path/to/config.txt'
connect_to_db(auth_file=auth_file)
# Load the dataset
df_timeline_specimen = load_data_timeline_specimen()
# Access the data
df_spec = df_timeline_specimen['data']
# Display the first few rows of the data
print(df_spec.head())
```
"""
df = _loader._load_impact_data_timeline_specimen()
output = Bunch(data=df)
return output
|