Reader small image

You're reading from  Matplotlib 2.x By Example

Product typeBook
Published inAug 2017
PublisherPackt
ISBN-139781788295260
Edition1st Edition
Right arrow
Authors (3):
Allen Yu
Allen Yu
author image
Allen Yu

Allen Yu, PhD, is a Chevening Scholar, 2017-18, and an MSC student in computer science at the University of Oxford. He holds a PhD degree in Biochemistry from the Chinese University of Hong Kong, and he has used Python and Matplotlib extensively during his 10 years of bioinformatics experience.
Read more about Allen Yu

Claire Chung
Claire Chung
author image
Claire Chung

Claire Chung is pursuing her PhD degree as a Bioinformatician at the Chinese University of Hong Kong. She enjoys using Python daily for work and lifehack. While passionate in science, her challenge-loving character motivates her to go beyond data analytics. She has participated in web development projects, as well as developed skills in graphic design and multilingual translation. She led the Campus Network Support Team in college, and shared her experience in data visualization in PyCon HK 2017.
Read more about Claire Chung

Aldrin Yim
Aldrin Yim
author image
Aldrin Yim

Aldrin Yim is a PhD candidate and Markey Scholar in the Computation and System Biology program at Washington University, School of Medicine. His research focuses on applying big data analytics and machine learning approaches in studying neurological diseases and cancer. He is also the founding CEO of Codex Genetics Limited, which provides precision medicine solutions to patients and hospitals in Asia.
Read more about Aldrin Yim

View More author details
Right arrow

Survival data analysis on cancer


Since we've spent a significant amount of time discussing death rate, let us conclude this chapter with one final analysis of two cancer datasets. We have obtained the de-identified clinical dataset of breast cancer and brain tumor from http://www.cbioportal.org/; our goal is to see what the overall survival outcome looks like, and whether the two cancers are having statistically different survival outcomes. The datasets are being explored only for research purposes:

# The clinical dataset are in tsv format
# We can use the .read_csv() method and add an argument sep='\t'
# to construct the dataframe
gbm_df = pd.read_csv('https://github.com/PacktPublishing/Matplotlib-2.x-
By-Example/blob/master/gbm_tcga_clinical_data.tsv',sep='\t')
gbm_primary_df = gbm_df[gbm_df['Sample Type']=='Primary Tumor']
.dropna(subset=['Overall Survival (Months)'])

brca_df = pd.read_csv('https://github.com/PacktPublishing/Matplotlib-2.x-
By-Example/blob/master/brca_metabric_clinical_data...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Matplotlib 2.x By Example
Published in: Aug 2017Publisher: PacktISBN-13: 9781788295260

Authors (3)

author image
Allen Yu

Allen Yu, PhD, is a Chevening Scholar, 2017-18, and an MSC student in computer science at the University of Oxford. He holds a PhD degree in Biochemistry from the Chinese University of Hong Kong, and he has used Python and Matplotlib extensively during his 10 years of bioinformatics experience.
Read more about Allen Yu

author image
Claire Chung

Claire Chung is pursuing her PhD degree as a Bioinformatician at the Chinese University of Hong Kong. She enjoys using Python daily for work and lifehack. While passionate in science, her challenge-loving character motivates her to go beyond data analytics. She has participated in web development projects, as well as developed skills in graphic design and multilingual translation. She led the Campus Network Support Team in college, and shared her experience in data visualization in PyCon HK 2017.
Read more about Claire Chung

author image
Aldrin Yim

Aldrin Yim is a PhD candidate and Markey Scholar in the Computation and System Biology program at Washington University, School of Medicine. His research focuses on applying big data analytics and machine learning approaches in studying neurological diseases and cancer. He is also the founding CEO of Codex Genetics Limited, which provides precision medicine solutions to patients and hospitals in Asia.
Read more about Aldrin Yim