Commit f439ea47 authored by Alessia Marcolini's avatar Alessia Marcolini
Browse files

Remove unused file

parent 63cbaf9c
%% Cell type:code id: tags:
``` python
%HN_env
```
%%%% Output: execute_result
<IPython.core.display.HTML object>
%% Cell type:code id: tags:
``` python
import os
# base path of the project
PATH = os.path.join(os.path.abspath(os.path.curdir), '..')
```
%% Cell type:code id: tags:
``` python
import numpy as np
import pandas as pd
```
%% Cell type:code id: tags:
``` python
clinical = pd.read_csv(f'{PATH}/data/clinical_data.csv')
```
%% Cell type:code id: tags:
``` python
clinical.head()
```
%%%% Output: execute_result
Patient # Sex Age Primary Site T-stage N-stage M-stage TNM group stage \
0 HN-HGJ-001 M 79.0 Larynx T3 N0 M0 stage III
1 HN-HGJ-002 M 41.0 Nasopharynx T1 N1 M0 stage IIB
2 HN-HGJ-003 M 75.0 Larynx T3 N2b M0 stage IVA
3 HN-HGJ-004 M 53.0 Nasopharynx T3 N1 M0 stage III
4 HN-HGJ-005 M 74.0 Nasopharynx T1 N1 M0 stage IIB
HPV status Time – diagnosis to diagnosis (days) ... Surgery \
0 - 0 ... 0.0
1 - 0 ... 0.0
2 NaN 0 ... 0.0
3 NaN 0 ... 0.0
4 - 0 ... 0.0
Time – diagnosis to last follow-up(days) Locoregional Distant Death \
0 2123 1 0 0
1 2114 1 0 0
2 1098 1 1 1
3 2974 0 0 0
4 2509 0 0 1
Time – diagnosis to LR (days) Time – diagnosis to DM (days) \
0 692.0 NaN
1 918.0 NaN
2 441.0 441.0
3 NaN NaN
4 NaN NaN
Time – diagnosis to Death (days) stage stage_simple
0 NaN III III
1 NaN IIB II
2 1098.0 IVA IV
3 NaN III III
4 2509.0 IIB II
[5 rows x 25 columns]
%% Cell type:code id: tags:
``` python
pd.unique(clinical['T-stage'].values)
```
%%%% Output: execute_result
array(['T3', 'T1', 'T4', 'T2', 'Tx', 'T4b', 'T4a'], dtype=object)
%% Cell type:code id: tags:
``` python
grading_dict = {
'T1': '0',
'T2': '0',
'T3': '1',
'T4': '1',
'T4a': '1',
'T4b': '1',
'Tx': '1',
}
```
%% Cell type:code id: tags:
``` python
clinical['T-stage_grouped'] = clinical['T-stage'].apply(lambda x: grading_dict[x])
```
%% Cell type:code id: tags:
``` python
clinical.head()
```
%%%% Output: execute_result
Patient # Sex Age Primary Site T-stage N-stage M-stage TNM group stage \
0 HN-HGJ-001 M 79.0 Larynx T3 N0 M0 stage III
1 HN-HGJ-002 M 41.0 Nasopharynx T1 N1 M0 stage IIB
2 HN-HGJ-003 M 75.0 Larynx T3 N2b M0 stage IVA
3 HN-HGJ-004 M 53.0 Nasopharynx T3 N1 M0 stage III
4 HN-HGJ-005 M 74.0 Nasopharynx T1 N1 M0 stage IIB
HPV status Time – diagnosis to diagnosis (days) ... \
0 - 0 ...
1 - 0 ...
2 NaN 0 ...
3 NaN 0 ...
4 - 0 ...
Time – diagnosis to last follow-up(days) Locoregional Distant Death \
0 2123 1 0 0
1 2114 1 0 0
2 1098 1 1 1
3 2974 0 0 0
4 2509 0 0 1
Time – diagnosis to LR (days) Time – diagnosis to DM (days) \
0 692.0 NaN
1 918.0 NaN
2 441.0 441.0
3 NaN NaN
4 NaN NaN
Time – diagnosis to Death (days) stage stage_simple T-stage_grouped
0 NaN III III 1
1 NaN IIB II 0
2 1098.0 IVA IV 1
3 NaN III III 1
4 2509.0 IIB II 0
[5 rows x 26 columns]
%% Cell type:code id: tags:
``` python
clinical.to_csv(f'{PATH}/data/clinical_data.csv', index=False)
```
%% Cell type:code id: tags:
``` python
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment