El análisis de estos datos está limitado a 252.343 registros accesibles de los 654.735 disponibles en adrreports.eu con fecha 26/12/2021. Se analiza el evento muerte asociado a la inoculación de la vacuna Pfizer (Comirnaty).
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
import warnings
fig = go.Figure()
warnings.filterwarnings('ignore')
#Carga de los dos archvos csv de Pfizer correspondientes al año 2020 (Pfizer1) y año 2021 (Pfizer2)
df1 = pd.read_csv('..\\..\\..\\..\\Desktop\\Vacunas\\Pfizer\\Run Line Listing Report Pfizer1.csv')
df2 = pd.read_csv('..\\..\\..\\..\\Desktop\\Vacunas\\Pfizer\\Run Line Listing Report Pfizer2.csv')
#Unión de los dos archivos en un único conjunto de datos
df_total = pd.concat([df1,df2])
#Información del tipo de variables, datos faltantes y ocupación de memoria.
df_total.info()
<class 'pandas.core.frame.DataFrame'> Int64Index: 252343 entries, 0 to 249903 Data columns (total 14 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 EU Local Number 252343 non-null object 1 Report Type 252339 non-null object 2 EV Gateway Receipt Date 252339 non-null object 3 Primary Source Qualification 252339 non-null object 4 Primary Source Country for Regulatory Purposes 252339 non-null object 5 Literature Reference 252339 non-null object 6 Patient Age Group 252339 non-null object 7 Patient Age Group (as per reporter) 252339 non-null object 8 Parent Child Report 252339 non-null object 9 Patient Sex 252339 non-null object 10 Reaction List PT (Duration – Outcome - Seriousness Criteria) 252339 non-null object 11 Suspect/interacting Drug List (Drug Char - Indication PT - Action taken - [Duration - Dose - Route]) 252339 non-null object 12 Concomitant/Not Administered Drug List (Drug Char - Indication PT - Action taken - [Duration - Dose - Route]) 252339 non-null object 13 ICSR Form 252339 non-null object dtypes: object(14) memory usage: 28.9+ MB
#Estadísticas generales del conjunto de datos
df_total.describe()
EU Local Number | Report Type | EV Gateway Receipt Date | Primary Source Qualification | Primary Source Country for Regulatory Purposes | Literature Reference | Patient Age Group | Patient Age Group (as per reporter) | Parent Child Report | Patient Sex | Reaction List PT (Duration – Outcome - Seriousness Criteria) | Suspect/interacting Drug List (Drug Char - Indication PT - Action taken - [Duration - Dose - Route]) | Concomitant/Not Administered Drug List (Drug Char - Indication PT - Action taken - [Duration - Dose - Route]) | ICSR Form | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
count | 252343 | 252339 | 252339 | 252339 | 252339 | 252339 | 252339 | 252339 | 252339 | 252339 | 252339 | 252339 | 252339 | 252339 |
unique | 252343 | 1 | 76 | 2 | 2 | 2110 | 8 | 8 | 2 | 3 | 165973 | 38755 | 33267 | 252339 |
top | EU-EC-10007281773 | Spontaneous | 2021-11-02 00:00:00 | Non Healthcare Professional | European Economic Area | Not available | 18-64 Years | Not Specified | No | Female | COVID-19 (n/a - Unknown - Other Medically Impo... | COMIRNATY [TOZINAMERAN] (S - Immunisation - n/... | Not reported | <a target="_blank" href="https://dap.ema.europ... |
freq | 1 | 252339 | 16537 | 150898 | 183771 | 249762 | 173134 | 129434 | 250574 | 164369 | 9269 | 34894 | 206092 | 1 |
#Hay valores 4 faltantes en el conjunto de datos
df_total.isnull().sum()
EU Local Number 0 Report Type 4 EV Gateway Receipt Date 4 Primary Source Qualification 4 Primary Source Country for Regulatory Purposes 4 Literature Reference 4 Patient Age Group 4 Patient Age Group (as per reporter) 4 Parent Child Report 4 Patient Sex 4 Reaction List PT (Duration – Outcome - Seriousness Criteria) 4 Suspect/interacting Drug List (Drug Char - Indication PT - Action taken - [Duration - Dose - Route]) 4 Concomitant/Not Administered Drug List (Drug Char - Indication PT - Action taken - [Duration - Dose - Route]) 4 ICSR Form 4 dtype: int64
#Normalización de nombres de columnas (variables)
cols = df_total.columns.str.strip().str.replace('((?<=[a-z0-9])[A-Z]|(?!^)[A-Z](?=[a-z]))', r'_\1').str.lower().str.replace('[ _-]+', '_').str.replace('[}{)(><.!?\\\\:;,-]', '')
df_total.columns = cols
#Reasignación de variables tipo objeto a variables categoricas
df_total[['report_type', 'primary_source_qualification','patient_age_group','patient_age_group_as_per_reporter','parent_child_report','patient_sex']] = df_total[['report_type', 'primary_source_qualification','patient_age_group','patient_age_group_as_per_reporter','parent_child_report','patient_sex']].astype('category')
#Reasignación de variables tipo objeto a variables fecha
df_total['ev_gateway_receipt_date'] = pd.to_datetime(df_total['ev_gateway_receipt_date'], format='%Y-%m-%d %H:%M:%S')
#Verificación de la reasignación con la consiguiente disminución de memoria.
df_total.info()
<class 'pandas.core.frame.DataFrame'> Int64Index: 252343 entries, 0 to 249903 Data columns (total 14 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 eu_local_number 252343 non-null object 1 report_type 252339 non-null category 2 ev_gateway_receipt_date 252339 non-null datetime64[ns] 3 primary_source_qualification 252339 non-null category 4 primary_source_country_for_regulatory_purposes 252339 non-null object 5 literature_reference 252339 non-null object 6 patient_age_group 252339 non-null category 7 patient_age_group_as_per_reporter 252339 non-null category 8 parent_child_report 252339 non-null category 9 patient_sex 252339 non-null category 10 reaction_list_pt__duration_–_outcome_seriousness_criteria 252339 non-null object 11 suspect/interacting_drug_list__drug_char_indication_pt_action_taken_[_duration_dose_route] 252339 non-null object 12 concomitant/_not_administered_drug_list__drug_char_indication_pt_action_taken_[_duration_dose_route] 252339 non-null object 13 icsr_form 252339 non-null object dtypes: category(6), datetime64[ns](1), object(7) memory usage: 18.8+ MB
#Filtrado resultado de muerte en grupo de 0 a 1 mes
babys = df_total.loc[(df_total['patient_age_group'].isin(['0-1 Month'])) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))]
babys[['\ufeffeu_local_number', 'report_type','ev_gateway_receipt_date','primary_source_qualification','primary_source_country_for_regulatory_purposes','literature_reference','patient_age_group',
'patient_age_group_as_per_reporter',
'parent_child_report',
'patient_sex']]
eu_local_number | report_type | ev_gateway_receipt_date | primary_source_qualification | primary_source_country_for_regulatory_purposes | literature_reference | patient_age_group | patient_age_group_as_per_reporter | parent_child_report | patient_sex | |
---|---|---|---|---|---|---|---|---|---|---|
3357 | EU-EC-10010922347 | Spontaneous | 2021-12-10 | Non Healthcare Professional | European Economic Area | Not available | 0-1 Month | Foetus | Yes | Not Specified |
18199 | EU-EC-10010882932 | Spontaneous | 2021-12-07 | Healthcare Professional | Non European Economic Area | Not available | 0-1 Month | Not Specified | No | Female |
18833 | EU-EC-10010884054 | Spontaneous | 2021-12-07 | Healthcare Professional | Non European Economic Area | Not available | 0-1 Month | Not Specified | Yes | Not Specified |
89872 | EU-EC-10010719029 | Spontaneous | 2021-11-22 | Healthcare Professional | European Economic Area | Not available | 0-1 Month | Neonate (Preterm and Term newborns) | Yes | Male |
136507 | EU-EC-10010582817 | Spontaneous | 2021-11-08 | Healthcare Professional | Non European Economic Area | Not available | 0-1 Month | Not Specified | No | Female |
151468 | EU-EC-10010546914 | Spontaneous | 2021-11-03 | Healthcare Professional | European Economic Area | Not available | 0-1 Month | Foetus | Yes | Not Specified |
156312 | EU-EC-10010515326 | Spontaneous | 2021-11-02 | Healthcare Professional | Non European Economic Area | Not available | 0-1 Month | Not Specified | No | Female |
160061 | EU-EC-10010520787 | Spontaneous | 2021-11-02 | Non Healthcare Professional | European Economic Area | Not available | 0-1 Month | Infant | Yes | Male |
214273 | EU-EC-10010391147 | Spontaneous | 2021-10-21 | Healthcare Professional | European Economic Area | Not available | 0-1 Month | Neonate (Preterm and Term newborns) | No | Male |
222642 | EU-EC-10010364705 | Spontaneous | 2021-10-19 | Healthcare Professional | European Economic Area | Not available | 0-1 Month | Neonate (Preterm and Term newborns) | Yes | Male |
#Total muertes encontradas en el grupo de 0 a 1 mes
len(babys)
10
#Filtrado resultado de muerte en grupo de 2 meses a 2 años
nenes = df_total.loc[(df_total['patient_age_group'].isin(['2 Months - 2 Years'])) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))]
nenes[['\ufeffeu_local_number', 'report_type','ev_gateway_receipt_date','primary_source_qualification','primary_source_country_for_regulatory_purposes','literature_reference','patient_age_group',
'patient_age_group_as_per_reporter',
'parent_child_report',
'patient_sex']]
eu_local_number | report_type | ev_gateway_receipt_date | primary_source_qualification | primary_source_country_for_regulatory_purposes | literature_reference | patient_age_group | patient_age_group_as_per_reporter | parent_child_report | patient_sex | |
---|---|---|---|---|---|---|---|---|---|---|
416 | EU-EC-10010913379 | Spontaneous | 2021-12-10 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Male |
8791 | EU-EC-10010910783 | Spontaneous | 2021-12-09 | Healthcare Professional | European Economic Area | . doi:10.1159/000520341 | 2 Months - 2 Years | Not Specified | No | Male |
13589 | EU-EC-10010896483 | Spontaneous | 2021-12-08 | Non Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Female |
24677 | EU-EC-10010856521 | Spontaneous | 2021-12-05 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Male |
32441 | EU-EC-10010841536 | Spontaneous | 2021-12-03 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Female |
35402 | EU-EC-10010849174 | Spontaneous | 2021-12-03 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Male |
38012 | EU-EC-10010830126 | Spontaneous | 2021-12-02 | Healthcare Professional | Non European Economic Area | Kawasaki N.; Meguro T.; Kawasaki M. et al.. Th... | 2 Months - 2 Years | Infant | No | Female |
42303 | EU-EC-10010812330 | Spontaneous | 2021-12-01 | Healthcare Professional | Non European Economic Area | Lim MA, Dowsett L, Hooten K, Wada R, Hutchins ... | 2 Months - 2 Years | Not Specified | No | Male |
47357 | EU-EC-10010799405 | Spontaneous | 2021-11-30 | Healthcare Professional | European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Female |
47434 | EU-EC-10010799714 | Spontaneous | 2021-11-30 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Child | No | Male |
47673 | EU-EC-10010800614 | Spontaneous | 2021-11-30 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Female |
48135 | EU-EC-10010801672 | Spontaneous | 2021-11-30 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Male |
48840 | EU-EC-10010803527 | Spontaneous | 2021-11-30 | Healthcare Professional | European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Male |
56743 | EU-EC-10010785543 | Spontaneous | 2021-11-28 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Male |
70161 | EU-EC-10010741872 | Spontaneous | 2021-11-24 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Male |
77828 | EU-EC-10010724320 | Spontaneous | 2021-11-23 | Non Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Male |
92402 | EU-EC-10010692482 | Spontaneous | 2021-11-19 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Female |
95419 | EU-EC-10010700591 | Spontaneous | 2021-11-19 | Healthcare Professional | European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Female |
96496 | EU-EC-10010679655 | Spontaneous | 2021-11-18 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Male |
107727 | EU-EC-10010661673 | Spontaneous | 2021-11-16 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Female |
117094 | EU-EC-10010633651 | Spontaneous | 2021-11-12 | Healthcare Professional | European Economic Area | Not available | 2 Months - 2 Years | Infant | No | Male |
119106 | EU-EC-10010614921 | Spontaneous | 2021-11-11 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Female |
128363 | EU-EC-10010588406 | Spontaneous | 2021-11-09 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Male |
147158 | EU-EC-10010560006 | Spontaneous | 2021-11-04 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Female |
174443 | EU-EC-10010484838 | Spontaneous | 2021-10-29 | Healthcare Professional | European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Female |
176535 | EU-EC-10010491825 | Spontaneous | 2021-10-29 | Healthcare Professional | Non European Economic Area | Nagao R, Kakimoto Y, Kakiuchi Y, Ochiai E, Set... | 2 Months - 2 Years | Not Specified | No | Male |
178488 | EU-EC-10010473189 | Spontaneous | 2021-10-28 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Male |
208802 | EU-EC-10010401244 | Spontaneous | 2021-10-22 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Female |
217177 | EU-EC-10010373087 | Spontaneous | 2021-10-20 | Healthcare Professional | Non European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Female |
220988 | EU-EC-10010359468 | Spontaneous | 2021-10-19 | Healthcare Professional | European Economic Area | Fusaro M, Vincent A, Castelle M, Rosain J, Fou... | 2 Months - 2 Years | Infant | No | Male |
224213 | EU-EC-10010343276 | Spontaneous | 2021-10-18 | Non Healthcare Professional | European Economic Area | Not available | 2 Months - 2 Years | Neonate (Preterm and Term newborns) | No | Male |
224794 | EU-EC-10010345224 | Spontaneous | 2021-10-18 | Healthcare Professional | European Economic Area | Not available | 2 Months - 2 Years | Not Specified | No | Male |
#Total muertes encontradas en el grupo de 2 meses a 2 años
len(nenes)
32
#Filtrado resultado de muerte en grupo de 3 a 11 años
ninos = df_total.loc[(df_total['patient_age_group'].isin(['3-11 Years'])) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))]
ninos[['\ufeffeu_local_number', 'report_type','ev_gateway_receipt_date','primary_source_qualification','primary_source_country_for_regulatory_purposes','literature_reference','patient_age_group',
'patient_age_group_as_per_reporter',
'parent_child_report',
'patient_sex']]
eu_local_number | report_type | ev_gateway_receipt_date | primary_source_qualification | primary_source_country_for_regulatory_purposes | literature_reference | patient_age_group | patient_age_group_as_per_reporter | parent_child_report | patient_sex | |
---|---|---|---|---|---|---|---|---|---|---|
8373 | EU-EC-10010909235 | Spontaneous | 2021-12-09 | Healthcare Professional | European Economic Area | Not available | 3-11 Years | Not Specified | No | Male |
11327 | EU-EC-10010892337 | Spontaneous | 2021-12-08 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Male |
20256 | EU-EC-10010863832 | Spontaneous | 2021-12-06 | Healthcare Professional | Non European Economic Area | Satoh T, Satoh T, Kayano H, Yasuda M, Kayano H... | 3-11 Years | Not Specified | No | Male |
29807 | EU-EC-10010862208 | Spontaneous | 2021-12-05 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Child | No | Male |
34633 | EU-EC-10010847759 | Spontaneous | 2021-12-03 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Male |
59985 | EU-EC-10010771433 | Spontaneous | 2021-11-26 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Male |
62329 | EU-EC-10010778057 | Spontaneous | 2021-11-26 | Healthcare Professional | European Economic Area | Not available | 3-11 Years | Child | No | Female |
72428 | EU-EC-10010746212 | Spontaneous | 2021-11-24 | Healthcare Professional | European Economic Area | Vanheeswijck L, Verlooy J, Van De Vijver E, Be... | 3-11 Years | Not Specified | No | Male |
79953 | EU-EC-10010728941 | Spontaneous | 2021-11-23 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Male |
94211 | EU-EC-10010697679 | Spontaneous | 2021-11-19 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Male |
95928 | EU-EC-10010701953 | Spontaneous | 2021-11-19 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Not Specified |
97384 | EU-EC-10010682652 | Spontaneous | 2021-11-18 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Not Specified |
98585 | EU-EC-10010685999 | Spontaneous | 2021-11-18 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Female |
99782 | EU-EC-10010689476 | Spontaneous | 2021-11-18 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Not Specified |
100212 | EU-EC-10010690267 | Spontaneous | 2021-11-18 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Male |
110516 | EU-EC-10010644905 | Spontaneous | 2021-11-15 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Not Specified |
113822 | EU-EC-10010638886 | Spontaneous | 2021-11-13 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Female |
115820 | EU-EC-10010629640 | Spontaneous | 2021-11-12 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Male |
119013 | EU-EC-10010614503 | Spontaneous | 2021-11-11 | Healthcare Professional | Non European Economic Area | Katsuren M, et al. Problems aiming for termina... | 3-11 Years | Not Specified | No | Male |
126965 | EU-EC-10010611813 | Spontaneous | 2021-11-10 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Male |
136857 | EU-EC-10010584059 | Spontaneous | 2021-11-08 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Child | No | Female |
138741 | EU-EC-10010573720 | Spontaneous | 2021-11-06 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Child | No | Male |
139667 | EU-EC-10010563149 | Spontaneous | 2021-11-05 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Child | No | Male |
152798 | EU-EC-10010509444 | Spontaneous | 2021-11-02 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Male |
162813 | EU-EC-10010525675 | Spontaneous | 2021-11-02 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Child | No | Male |
174456 | EU-EC-10010484912 | Spontaneous | 2021-10-29 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Male |
177174 | EU-EC-10010468373 | Spontaneous | 2021-10-28 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Female |
181449 | EU-EC-10010455383 | Spontaneous | 2021-10-27 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Female |
182308 | EU-EC-10010458321 | Spontaneous | 2021-10-27 | Healthcare Professional | Non European Economic Area | Ylade M, Agrupis A.K, Daag V.J, Crisostomo V.M... | 3-11 Years | Not Specified | No | Female |
185922 | EU-EC-10010467702 | Spontaneous | 2021-10-27 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Female |
196454 | EU-EC-10010414504 | Spontaneous | 2021-10-25 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Female |
198977 | EU-EC-10010420941 | Spontaneous | 2021-10-25 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Female |
211952 | EU-EC-10010384925 | Spontaneous | 2021-10-21 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Not Specified |
213869 | EU-EC-10010390442 | Spontaneous | 2021-10-21 | Healthcare Professional | Non European Economic Area | Not available | 3-11 Years | Not Specified | No | Not Specified |
220813 | EU-EC-10010358883 | Spontaneous | 2021-10-19 | Healthcare Professional | Non European Economic Area | Itakura Y, Kamitori T, Ueno H, Asaka S, Kawagu... | 3-11 Years | Not Specified | No | Female |
#Total muertes encontradas en el grupo de de 3 a 11 años
len(ninos)
35
#Filtrado resultado de muerte en grupo de 12 a 17 años
jovenes = df_total.loc[(df_total['patient_age_group'].isin(['12-17 Years'])) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))]
jovenes[['\ufeffeu_local_number', 'report_type','ev_gateway_receipt_date','primary_source_qualification','primary_source_country_for_regulatory_purposes','literature_reference','patient_age_group',
'patient_age_group_as_per_reporter',
'parent_child_report',
'patient_sex']]
eu_local_number | report_type | ev_gateway_receipt_date | primary_source_qualification | primary_source_country_for_regulatory_purposes | literature_reference | patient_age_group | patient_age_group_as_per_reporter | parent_child_report | patient_sex | |
---|---|---|---|---|---|---|---|---|---|---|
639 | EU-EC-10010914124 | Spontaneous | 2021-12-10 | Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
4269 | EU-EC-10010923828 | Spontaneous | 2021-12-10 | Non Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
9354 | EU-EC-10010912115 | Spontaneous | 2021-12-09 | Healthcare Professional | European Economic Area | Not available | 12-17 Years | Adolescent | No | Male |
10305 | EU-EC-10010889205 | Spontaneous | 2021-12-08 | Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
21897 | EU-EC-10010868257 | Spontaneous | 2021-12-06 | Non Healthcare Professional | European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
22202 | EU-EC-10010868932 | Spontaneous | 2021-12-06 | Non Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
36025 | EU-EC-10010851045 | Spontaneous | 2021-12-03 | Non Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Female |
36741 | EU-EC-10010826185 | Spontaneous | 2021-12-02 | Non Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
38276 | EU-EC-10010830694 | Spontaneous | 2021-12-02 | Healthcare Professional | European Economic Area | Not available | 12-17 Years | Not Specified | No | Not Specified |
40380 | EU-EC-10010835805 | Spontaneous | 2021-12-02 | Healthcare Professional | European Economic Area | Not available | 12-17 Years | Adolescent | No | Female |
42180 | EU-EC-10010811785 | Spontaneous | 2021-12-01 | Healthcare Professional | European Economic Area | Not available | 12-17 Years | Not Specified | No | Female |
44445 | EU-EC-10010818846 | Spontaneous | 2021-12-01 | Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
46352 | EU-EC-10010822831 | Spontaneous | 2021-12-01 | Healthcare Professional | European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
85556 | EU-EC-10010707025 | Spontaneous | 2021-11-22 | Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Adolescent | No | Male |
93696 | EU-EC-10010696156 | Spontaneous | 2021-11-19 | Non Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Adolescent | No | Male |
102331 | EU-EC-10010672595 | Spontaneous | 2021-11-17 | Non Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Female |
102462 | EU-EC-10010672975 | Spontaneous | 2021-11-17 | Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
107546 | EU-EC-10010660918 | Spontaneous | 2021-11-16 | Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Female |
107846 | EU-EC-10010661990 | Spontaneous | 2021-11-16 | Healthcare Professional | European Economic Area | Not available | 12-17 Years | Adolescent | No | Male |
112367 | EU-EC-10010650054 | Spontaneous | 2021-11-15 | Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Female |
116711 | EU-EC-10010632312 | Spontaneous | 2021-11-12 | Healthcare Professional | European Economic Area | Not available | 12-17 Years | Adolescent | No | Male |
121082 | EU-EC-10010620335 | Spontaneous | 2021-11-11 | Non Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
135210 | EU-EC-10010579325 | Spontaneous | 2021-11-08 | Non Healthcare Professional | European Economic Area | Not available | 12-17 Years | Not Specified | No | Female |
168930 | EU-EC-10010535956 | Spontaneous | 2021-11-02 | Healthcare Professional | European Economic Area | Not available | 12-17 Years | Adolescent | No | Male |
176993 | EU-EC-10010493474 | Spontaneous | 2021-10-29 | Healthcare Professional | European Economic Area | Not available | 12-17 Years | Adolescent | No | Male |
178394 | EU-EC-10010473038 | Spontaneous | 2021-10-28 | Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
178696 | EU-EC-10010473967 | Spontaneous | 2021-10-28 | Healthcare Professional | European Economic Area | Golebiowski W, Zielinska M, Kubica-Cielinska A... | 12-17 Years | Adolescent | No | Female |
179989 | EU-EC-10010477762 | Spontaneous | 2021-10-28 | Non Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Female |
195887 | EU-EC-10010412901 | Spontaneous | 2021-10-25 | Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
212477 | EU-EC-10010386904 | Spontaneous | 2021-10-21 | Healthcare Professional | Non European Economic Area | . | 12-17 Years | Not Specified | No | Male |
212807 | EU-EC-10010387413 | Spontaneous | 2021-10-21 | Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Female |
214282 | EU-EC-10010391161 | Spontaneous | 2021-10-21 | Healthcare Professional | European Economic Area | Not available | 12-17 Years | Adolescent | No | Female |
215404 | EU-EC-10010394331 | Spontaneous | 2021-10-21 | Healthcare Professional | European Economic Area | Not available | 12-17 Years | Adolescent | No | Male |
221270 | EU-EC-10010360356 | Spontaneous | 2021-10-19 | Non Healthcare Professional | European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
227807 | EU-EC-10010350152 | Spontaneous | 2021-10-18 | Non Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Female |
235129 | EU-EC-10010338025 | Spontaneous | 2021-10-15 | Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
235363 | EU-EC-10010338768 | Spontaneous | 2021-10-15 | Non Healthcare Professional | European Economic Area | Not available | 12-17 Years | Not Specified | No | Male |
243802 | EU-EC-10010303039 | Spontaneous | 2021-10-13 | Healthcare Professional | Non European Economic Area | Not available | 12-17 Years | Not Specified | No | Female |
#Total muertes encontradas en el grupo de 12 a 17 años
len(jovenes)
38
#Filtrado resultado de muerte en grupo de 18 a 64 años
adultos = df_total.loc[(df_total['patient_age_group'].isin(['18-64 Years'])) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))]
adultos[['\ufeffeu_local_number', 'report_type','ev_gateway_receipt_date','primary_source_qualification','primary_source_country_for_regulatory_purposes','literature_reference','patient_age_group',
'patient_age_group_as_per_reporter',
'parent_child_report',
'patient_sex']]
eu_local_number | report_type | ev_gateway_receipt_date | primary_source_qualification | primary_source_country_for_regulatory_purposes | literature_reference | patient_age_group | patient_age_group_as_per_reporter | parent_child_report | patient_sex | |
---|---|---|---|---|---|---|---|---|---|---|
978 | EU-EC-10007255731 | Spontaneous | 2020-12-25 | Healthcare Professional | European Economic Area | Not available | 18-64 Years | Adult | No | Male |
207 | EU-EC-10010912915 | Spontaneous | 2021-12-10 | Non Healthcare Professional | European Economic Area | Not available | 18-64 Years | Not Specified | No | Female |
424 | EU-EC-10010913398 | Spontaneous | 2021-12-10 | Healthcare Professional | Non European Economic Area | Not available | 18-64 Years | Not Specified | No | Male |
444 | EU-EC-10010913438 | Spontaneous | 2021-12-10 | Healthcare Professional | Non European Economic Area | Not available | 18-64 Years | Not Specified | No | Female |
452 | EU-EC-10010913489 | Spontaneous | 2021-12-10 | Healthcare Professional | Non European Economic Area | Not available | 18-64 Years | Not Specified | No | Female |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
248981 | EU-EC-10010292260 | Spontaneous | 2021-10-12 | Non Healthcare Professional | European Economic Area | Not available | 18-64 Years | Adult | No | Male |
249064 | EU-EC-10010292379 | Spontaneous | 2021-10-12 | Healthcare Professional | European Economic Area | Not available | 18-64 Years | Not Specified | No | Female |
249808 | EU-EC-10010294275 | Spontaneous | 2021-10-12 | Non Healthcare Professional | Non European Economic Area | Not available | 18-64 Years | Not Specified | No | Male |
249860 | EU-EC-10010294462 | Spontaneous | 2021-10-12 | Healthcare Professional | Non European Economic Area | Not available | 18-64 Years | Not Specified | No | Female |
249880 | EU-EC-10010294554 | Spontaneous | 2021-10-12 | Healthcare Professional | Non European Economic Area | Not available | 18-64 Years | Not Specified | No | Male |
1569 rows × 10 columns
#Total muertes encontradas en el grupo de 18 a 64 años
len(adultos)
1569
#Filtrado resultado de muerte en grupo de 65 a 85 años
mayores = df_total.loc[(df_total['patient_age_group'].isin(['65-85 Years'])) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))]
mayores[['\ufeffeu_local_number', 'report_type','ev_gateway_receipt_date','primary_source_qualification','primary_source_country_for_regulatory_purposes','literature_reference','patient_age_group',
'patient_age_group_as_per_reporter',
'parent_child_report',
'patient_sex']]
eu_local_number | report_type | ev_gateway_receipt_date | primary_source_qualification | primary_source_country_for_regulatory_purposes | literature_reference | patient_age_group | patient_age_group_as_per_reporter | parent_child_report | patient_sex | |
---|---|---|---|---|---|---|---|---|---|---|
1056 | EU-EC-10007249776 | Spontaneous | 2020-12-24 | Healthcare Professional | European Economic Area | Not available | 65-85 Years | Not Specified | No | Male |
1201 | EU-EC-10007250183 | Spontaneous | 2020-12-24 | Healthcare Professional | European Economic Area | Not available | 65-85 Years | Not Specified | No | Female |
1273 | EU-EC-10007242008 | Spontaneous | 2020-12-23 | Non Healthcare Professional | European Economic Area | Not available | 65-85 Years | Not Specified | No | Male |
189 | EU-EC-10010912878 | Spontaneous | 2021-12-10 | Non Healthcare Professional | European Economic Area | Not available | 65-85 Years | Not Specified | No | Male |
282 | EU-EC-10010913043 | Spontaneous | 2021-12-10 | Non Healthcare Professional | European Economic Area | Not available | 65-85 Years | Not Specified | No | Male |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
249444 | EU-EC-10010293521 | Spontaneous | 2021-10-12 | Healthcare Professional | European Economic Area | Not available | 65-85 Years | Not Specified | No | Male |
249630 | EU-EC-10010293938 | Spontaneous | 2021-10-12 | Healthcare Professional | Non European Economic Area | Not available | 65-85 Years | Not Specified | Yes | Male |
249778 | EU-EC-10010294186 | Spontaneous | 2021-10-12 | Non Healthcare Professional | European Economic Area | Not available | 65-85 Years | Not Specified | No | Female |
249784 | EU-EC-10010294201 | Spontaneous | 2021-10-12 | Healthcare Professional | Non European Economic Area | Not available | 65-85 Years | Not Specified | No | Male |
249809 | EU-EC-10010294278 | Spontaneous | 2021-10-12 | Healthcare Professional | Non European Economic Area | Not available | 65-85 Years | Not Specified | No | Male |
2311 rows × 10 columns
#Total muertes encontradas en el grupo de 65 a 85 años
len(mayores)
2311
#Filtrado resultado de muerte en el grupo de más de 85 años
abuelos = df_total.loc[(df_total['patient_age_group'].isin(['More than 85 Years'])) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))]
abuelos[['\ufeffeu_local_number', 'report_type','ev_gateway_receipt_date','primary_source_qualification','primary_source_country_for_regulatory_purposes','literature_reference','patient_age_group',
'patient_age_group_as_per_reporter',
'parent_child_report',
'patient_sex']]
eu_local_number | report_type | ev_gateway_receipt_date | primary_source_qualification | primary_source_country_for_regulatory_purposes | literature_reference | patient_age_group | patient_age_group_as_per_reporter | parent_child_report | patient_sex | |
---|---|---|---|---|---|---|---|---|---|---|
232 | EU-EC-10007276795 | Spontaneous | 2020-12-30 | Healthcare Professional | European Economic Area | Not available | More than 85 Years | Not Specified | No | Male |
921 | EU-EC-10007255625 | Spontaneous | 2020-12-25 | Healthcare Professional | European Economic Area | Not available | More than 85 Years | Not Specified | No | Male |
1158 | EU-EC-10007249906 | Spontaneous | 2020-12-24 | Healthcare Professional | European Economic Area | Not available | More than 85 Years | Not Specified | No | Female |
126 | EU-EC-10010912708 | Spontaneous | 2021-12-10 | Healthcare Professional | European Economic Area | Not available | More than 85 Years | Not Specified | No | Female |
222 | EU-EC-10010912942 | Spontaneous | 2021-12-10 | Healthcare Professional | European Economic Area | Not available | More than 85 Years | Not Specified | No | Female |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
248495 | EU-EC-10010290956 | Spontaneous | 2021-10-12 | Healthcare Professional | Non European Economic Area | Not available | More than 85 Years | Not Specified | No | Female |
248727 | EU-EC-10010291515 | Spontaneous | 2021-10-12 | Healthcare Professional | European Economic Area | Not available | More than 85 Years | Elderly | No | Female |
249225 | EU-EC-10010292687 | Spontaneous | 2021-10-12 | Healthcare Professional | European Economic Area | Not available | More than 85 Years | Not Specified | No | Female |
249505 | EU-EC-10010293748 | Spontaneous | 2021-10-12 | Healthcare Professional | European Economic Area | Not available | More than 85 Years | Elderly | No | Female |
249801 | EU-EC-10010294257 | Spontaneous | 2021-10-12 | Healthcare Professional | Non European Economic Area | Not available | More than 85 Years | Not Specified | No | Female |
815 rows × 10 columns
#Total muertes encontradas en el grupo de más de 85 años
len(abuelos)
815
#Filtrado resultado de muerte en grupo de edad NO ESPECIFICADA
no_especificado = df_total.loc[(df_total['patient_age_group'].isin(['Not Specified'])) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))]
no_especificado[['\ufeffeu_local_number', 'report_type','ev_gateway_receipt_date','primary_source_qualification','primary_source_country_for_regulatory_purposes','literature_reference','patient_age_group',
'patient_age_group_as_per_reporter',
'parent_child_report',
'patient_sex']]
eu_local_number | report_type | ev_gateway_receipt_date | primary_source_qualification | primary_source_country_for_regulatory_purposes | literature_reference | patient_age_group | patient_age_group_as_per_reporter | parent_child_report | patient_sex | |
---|---|---|---|---|---|---|---|---|---|---|
1286 | EU-EC-10007242026 | Spontaneous | 2020-12-23 | Non Healthcare Professional | European Economic Area | Not available | Not Specified | Not Specified | No | Male |
36 | EU-EC-10010912433 | Spontaneous | 2021-12-10 | Non Healthcare Professional | Non European Economic Area | Not available | Not Specified | Not Specified | No | Male |
1209 | EU-EC-10010915565 | Spontaneous | 2021-12-10 | Non Healthcare Professional | Non European Economic Area | Not available | Not Specified | Not Specified | No | Female |
1670 | EU-EC-10010916567 | Spontaneous | 2021-12-10 | Healthcare Professional | Non European Economic Area | Obana A, Gohto Y, Asaoka R, Seto T, Ishii K, N... | Not Specified | Not Specified | No | Not Specified |
1826 | EU-EC-10010916999 | Spontaneous | 2021-12-10 | Healthcare Professional | Non European Economic Area | Not available | Not Specified | Adult | No | Male |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
247901 | EU-EC-10010289266 | Spontaneous | 2021-10-12 | Healthcare Professional | Non European Economic Area | Not available | Not Specified | Not Specified | No | Male |
248323 | EU-EC-10010290721 | Spontaneous | 2021-10-12 | Healthcare Professional | Non European Economic Area | Not available | Not Specified | Not Specified | No | Female |
249240 | EU-EC-10010292724 | Spontaneous | 2021-10-12 | Healthcare Professional | Non European Economic Area | Not available | Not Specified | Elderly | No | Not Specified |
249446 | EU-EC-10010293527 | Spontaneous | 2021-10-12 | Healthcare Professional | European Economic Area | Not available | Not Specified | Elderly | No | Not Specified |
249885 | EU-EC-10010294587 | Spontaneous | 2021-10-12 | Healthcare Professional | European Economic Area | Not available | Not Specified | Not Specified | No | Male |
825 rows × 10 columns
#Total muertes encontradas en grupo de edad NO ESPECIFICADA
len(no_especificado)
825
#Filtrado resultado de muerte TOTALES
todos = df_total.loc[(df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))]
todos[['\ufeffeu_local_number', 'report_type','ev_gateway_receipt_date','primary_source_qualification','primary_source_country_for_regulatory_purposes','literature_reference','patient_age_group',
'patient_age_group_as_per_reporter',
'parent_child_report',
'patient_sex']]
eu_local_number | report_type | ev_gateway_receipt_date | primary_source_qualification | primary_source_country_for_regulatory_purposes | literature_reference | patient_age_group | patient_age_group_as_per_reporter | parent_child_report | patient_sex | |
---|---|---|---|---|---|---|---|---|---|---|
232 | EU-EC-10007276795 | Spontaneous | 2020-12-30 | Healthcare Professional | European Economic Area | Not available | More than 85 Years | Not Specified | No | Male |
921 | EU-EC-10007255625 | Spontaneous | 2020-12-25 | Healthcare Professional | European Economic Area | Not available | More than 85 Years | Not Specified | No | Male |
978 | EU-EC-10007255731 | Spontaneous | 2020-12-25 | Healthcare Professional | European Economic Area | Not available | 18-64 Years | Adult | No | Male |
1056 | EU-EC-10007249776 | Spontaneous | 2020-12-24 | Healthcare Professional | European Economic Area | Not available | 65-85 Years | Not Specified | No | Male |
1158 | EU-EC-10007249906 | Spontaneous | 2020-12-24 | Healthcare Professional | European Economic Area | Not available | More than 85 Years | Not Specified | No | Female |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
249808 | EU-EC-10010294275 | Spontaneous | 2021-10-12 | Non Healthcare Professional | Non European Economic Area | Not available | 18-64 Years | Not Specified | No | Male |
249809 | EU-EC-10010294278 | Spontaneous | 2021-10-12 | Healthcare Professional | Non European Economic Area | Not available | 65-85 Years | Not Specified | No | Male |
249860 | EU-EC-10010294462 | Spontaneous | 2021-10-12 | Healthcare Professional | Non European Economic Area | Not available | 18-64 Years | Not Specified | No | Female |
249880 | EU-EC-10010294554 | Spontaneous | 2021-10-12 | Healthcare Professional | Non European Economic Area | Not available | 18-64 Years | Not Specified | No | Male |
249885 | EU-EC-10010294587 | Spontaneous | 2021-10-12 | Healthcare Professional | European Economic Area | Not available | Not Specified | Not Specified | No | Male |
5635 rows × 10 columns
#Total muertes encontradas
len(todos)
5635
df_total = df_total.loc[(((((((((((((((df_total['patient_age_group'].isin(['0-1 Month'])) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))) | (df_total['patient_age_group'].isin(['2 Months- 2 Years']))) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))) | (df_total['patient_age_group'].isin(['3-11 Years']))) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))) | (df_total['patient_age_group'].isin(['12-17 Years']))) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))) | (df_total['patient_age_group'].isin(['18-64 Years']))) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))) | (df_total['patient_age_group'].isin(['65-85 Years']))) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))) | (df_total['patient_age_group'].isin(['More than 85 Years']))) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))) | (df_total['patient_age_group'].isin(['Not Specified']))) & (df_total['reaction_list_pt__duration_–_outcome_seriousness_criteria'].str.contains('Results in Death', case=True, regex=False, na=False))]
#Creación de nueva columna basada en etiquetas de grupo de edad
df_total['patient_age_group_label'] = df_total['patient_age_group'].factorize(sort=False, na_sentinel=-1)[0]
#Agrupación de datos por rango de edad
df_group = df_total.groupby(['patient_age_group']).agg(patient_age_group_label_size=('patient_age_group_label', 'size')).reset_index()
df_group.rename(columns={'patient_age_group':'Grupo de edad',
'patient_age_group_label_size':'Nº muertes'}, inplace=True)
df_group.sort_values('Nº muertes', inplace=True)
df_group
Grupo de edad | Nº muertes | |
---|---|---|
3 | 2 Months - 2 Years | 0 |
0 | 0-1 Month | 10 |
4 | 3-11 Years | 35 |
1 | 12-17 Years | 38 |
6 | More than 85 Years | 815 |
7 | Not Specified | 825 |
2 | 18-64 Years | 1569 |
5 | 65-85 Years | 2311 |
fig = px.bar(df_group, x='Grupo de edad', y='Nº muertes')
fig.update_layout(
title={
'text':'<b>Evento de muerte asociado a la vacuna Pfizer (Comirnaty) por rangos de edad</b>',
'y':0.92,
'x':0.5,
'xanchor':'center',
'yanchor':'top' },
xaxis_title='<b>Rango Edad</b>',
yaxis_title='<b>Nº. Muertes</b>',
font=dict(
size=12,
color='#92d050',
)
)
fig.update_traces(marker_color='#92d050',
hovertemplate = 'Muertes: %{y}'+'<br>Rango edad: %{x}')