{ "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', 10)\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(\"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(\"2021VAERSData/2021VAERSVAX.csv\", index_col='VAERS_ID', encoding='latin1')" ] }, { "cell_type": "code", "execution_count": null, "id": "d8942466", "metadata": { "scrolled": false }, "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": "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": "349da946", "metadata": { "scrolled": false }, "outputs": [], "source": [ "df = df_PFIZER_BIONTECH[df_PFIZER_BIONTECH['DIED']=='Y'][['VAX_LOT']]\n", "df" ] }, { "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", "pd.set_option('display.max_rows', None)\n", "df.value_counts()" ] }, { "cell_type": "code", "execution_count": null, "id": "eff80ae1", "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 }