<jupyter_start><jupyter_text>Information about dataset```    1. class:         1 = lung        2 = head & neck        3 = esophasus        4 = thyroid        5 = stomach        6 = duoden & sm.int        7 = colon        8 = rectum        9 = anus        10 = salivary glands        11 = ancreas        12 = gallblader        13 = liver        14 = kidney        15 = bladder        16 = testis        17 = prostate        18 = ovary        19 = corpus uteri        20 = cervix uteri        21 = vagina        22 = breast    2. age:   =60    3. sex:   male, female    4. histologic-type: epidermoid, adeno, anaplastic    5. degree-of-diffe: well, fairly, poorly    6. bone: yes, no    7. bone-marrow: yes, no    8. lung: yes, no    9. pleura: yes, no   10. peritoneum: yes, no   11. liver: yes, no   12. brain: yes, no   13. skin: yes, no   14. neck: yes, no   15. supraclavicular: yes, no   16. axillar: yes, no   17. mediastinum: yes, no   18. abdominal: yes, no```<jupyter_code>#importing necessary packages
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import missingno as msno
import seaborn as sns
import scipy.stats as st
#reading a file and adding column names to it.
names=['class','age','sex','histologic-type','degree-of-diffe','bone','bone-marrow','lung','pleura','peritoneum','liver','brain','skin','neck','supraclavicular','axillar','mediastinum','abdominal']
data = pd.read_csv('primary-tumor.csv',header=None,names=names)
data.head()
## types of values in each attribute
data.dtypes
data = data.replace('?',np.NaN)
data.head()<jupyter_output><empty_output><jupyter_text>Creating another catefory for the missing values  ```I have replaced all the NaN values with integer number 5. So that in all the columns which contains NaN values will have another category 5 which can be interpreted as 'Unknown'.```<jupyter_code>#We can create another category for the missing values and use them as a different level. 
data = data.fillna(5)
data.head()<jupyter_output><empty_output><jupyter_text>Tumor-wise frequency diagram<jupyter_code>data['class'].value_counts()
data['class'].value_counts().plot(kind='bar',figsize=(15,7))<jupyter_output><empty_output><jupyter_text>Observation:``` People affected with Lung cancer are maximum.```  Age wise comparison to lung cancer```age classes:1 = <302 = 30-593 = >59```<jupyter_code>data.groupby('age')['class'].value_counts().unstack().loc[:,1].plot(kind = 'bar')<jupyter_output><empty_output><jupyter_text>```People having age between 30-59 are maximum affected with lung cancer.```  Age-wise comparison to all type of cancers.<jupyter_code>x = sns.jointplot('age','class',data = data,kind = 'kde', color = 'red')<jupyter_output><empty_output><jupyter_text>Observation:```In all types of cancer, people having age between 30-59 years are maximum.```   Diseased Lungs' effect on different type of cancer:<jupyter_code>data.groupby('class')['lung'].value_counts(normalize = True).unstack().loc[:,1].plot(kind= 'bar')<jupyter_output><empty_output><jupyter_text>Observation:```According to above graph, diseased lungs don't causes more to happen lung cancer. But surprisingly, diseased lungs causes more to happen duoden & sm.int, testis and vagina cancer.```  Diseased liver's effect on different type of cancer<jupyter_code>data.groupby('class')['liver'].value_counts(normalize = True).unstack().loc[:,1].plot(kind = 'bar')<jupyter_output><empty_output><jupyter_text>Observation:```Liver cancer class is 13th one.And from the graph we can see that 13th class has no instances when liver is diseased and there is liver cancer.```<jupyter_code>x = sns.jointplot('degree-of-diffe','class',data = data,kind = 'kde', color = 'red')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1297587131367292, 'fraction_numerical': 0.025737265415549597, 'mean_word_length': 4.376080691642652, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 34, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 2, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '495634', 'license': 'Apache-2.0', 'n_tokens_mistral': 1260, 'n_tokens_neox': 1157, 'n_words': 360, 'path': 'Labs/Lab1/Romil/Notebooks/Tumor_EDA.ipynb', 'repo_name': 'heenalsapovadia/ml_practices_2018', 'size': '3730'}