{ "cells": [ { "cell_type": "code", "execution_count": null, "id": "9de5907f-18f5-4cb1-903e-26028ff1fa03", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n", "pd.set_option('display.max_rows', 100)\n", "pd.set_option('display.max_columns', None)" ] }, { "cell_type": "code", "execution_count": null, "id": "ad0e6044", "metadata": {}, "outputs": [], "source": [ "df_patients_22 = pd.read_csv(\"VAERS/2021VAERSData/2021VAERSDATA.csv\", index_col='VAERS_ID', encoding='latin1', low_memory=False)" ] }, { "cell_type": "code", "execution_count": null, "id": "4472e902", "metadata": {}, "outputs": [], "source": [ "df_patients_22.index\n", "df_patients_22" ] }, { "cell_type": "code", "execution_count": null, "id": "fb54ec47", "metadata": {}, "outputs": [], "source": [ "df_vax_22 = pd.read_csv(\"VAERS/2021VAERSData/2021VAERSVAX.csv\", index_col='VAERS_ID', encoding='latin1')" ] }, { "cell_type": "code", "execution_count": null, "id": "d8942466", "metadata": { "scrolled": true }, "outputs": [], "source": [ "df_vax_22" ] }, { "cell_type": "code", "execution_count": null, "id": "d31c5225", "metadata": {}, "outputs": [], "source": [ "df_COVID19_22 = df_vax_22[df_vax_22[\"VAX_TYPE\"] == \"COVID19\"]" ] }, { "cell_type": "code", "execution_count": null, "id": "be2b57c9", "metadata": { "scrolled": false }, "outputs": [], "source": [ "df_COVID19_22" ] }, { "cell_type": "code", "execution_count": null, "id": "8c432ab2", "metadata": {}, "outputs": [], "source": [ "df_patients_COVID19 = pd.merge(df_patients_22, df_COVID19_22, left_index=True, right_index=True)" ] }, { "cell_type": "code", "execution_count": null, "id": "fef882ff", "metadata": {}, "outputs": [], "source": [ "df_patients_22.shape, df_COVID19_22.shape, df_patients_COVID19.shape" ] }, { "cell_type": "code", "execution_count": null, "id": "6ce15322", "metadata": { "scrolled": false }, "outputs": [], "source": [ "# pd.set_option('display.max_rows', 100)\n", "df_patients_COVID19" ] }, { "cell_type": "code", "execution_count": null, "id": "233bc590", "metadata": {}, "outputs": [], "source": [ "df_PFIZER_BIONTECH = df_patients_COVID19[df_patients_COVID19[\"VAX_MANU\"] == \"MODERNA\"]" ] }, { "cell_type": "code", "execution_count": null, "id": "e41885a8", "metadata": {}, "outputs": [], "source": [ "df_PFIZER_BIONTECH" ] }, { "cell_type": "code", "execution_count": null, "id": "86e0e4f2", "metadata": {}, "outputs": [], "source": [ "df_PFIZER_BIONTECH.info()" ] }, { "cell_type": "code", "execution_count": null, "id": "4b3cb943", "metadata": {}, "outputs": [], "source": [ "# table = pd.pivot_table(df_PFIZER_BIONTECH, values='DIED', columns=['DIED'], aggfunc=np.sum)" ] }, { "cell_type": "code", "execution_count": null, "id": "284bf448", "metadata": {}, "outputs": [], "source": [ "pd.set_option('display.max_rows', None)" ] }, { "cell_type": "code", "execution_count": null, "id": "349da946", "metadata": { "scrolled": true }, "outputs": [], "source": [ "df_DIED = df_PFIZER_BIONTECH[df_PFIZER_BIONTECH['DIED']=='Y'][['VAX_LOT']]\n", "df_DIED" ] }, { "cell_type": "code", "execution_count": null, "id": "9c5ff2fd", "metadata": { "scrolled": false }, "outputs": [], "source": [ "# df = df.groupby(['VAX_LOT']).count()\n", "#df2 = df.sort_values(by=['DIED'], ascending=False)\n", "#pd.set_option('display.max_rows', None)\n", "#print(df2)\n", "df_DIED.value_counts()" ] }, { "cell_type": "code", "execution_count": null, "id": "2f660707", "metadata": { "scrolled": false }, "outputs": [], "source": [ "df_DISABLE = df_PFIZER_BIONTECH[df_PFIZER_BIONTECH['DISABLE']=='Y'][['VAX_LOT']]\n", "df_DISABLE" ] }, { "cell_type": "code", "execution_count": null, "id": "3d782392", "metadata": {}, "outputs": [], "source": [ "df_DISABLE.value_counts()" ] }, { "cell_type": "code", "execution_count": null, "id": "9f537710", "metadata": { "scrolled": false }, "outputs": [], "source": [ "df_L_THREAT = df_PFIZER_BIONTECH[df_PFIZER_BIONTECH['L_THREAT']=='Y'][['VAX_LOT']]\n", "df_L_THREAT" ] }, { "cell_type": "code", "execution_count": null, "id": "1a629007", "metadata": { "scrolled": false }, "outputs": [], "source": [ "df_L_THREAT.value_counts()" ] }, { "cell_type": "code", "execution_count": null, "id": "f675fcfe", "metadata": { "scrolled": false }, "outputs": [], "source": [ "df_ADR = df_PFIZER_BIONTECH[['VAX_LOT']]\n", "df_ADR" ] }, { "cell_type": "code", "execution_count": null, "id": "7b3005db", "metadata": { "scrolled": false }, "outputs": [], "source": [ "df_ADR_valueCounts = df_ADR.value_counts()" ] }, { "cell_type": "code", "execution_count": null, "id": "07c93e74", "metadata": { "scrolled": false }, "outputs": [], "source": [ "df_ADR_valueCounts" ] }, { "cell_type": "code", "execution_count": null, "id": "1244c494", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.7" } }, "nbformat": 4, "nbformat_minor": 5 }