diff options
| author | Charles <sircharlesaze@gmail.com> | 2020-01-25 13:06:10 +0100 |
|---|---|---|
| committer | Charles <sircharlesaze@gmail.com> | 2020-01-25 13:06:10 +0100 |
| commit | dea0f4cdec5bdf24962c8ab3ab2a6473e202259a (patch) | |
| tree | a2a703a50b2d744e103a657d50ea793743ce1ff5 /dslr_notebook.ipynb | |
| parent | d5e51613d3582e18e858055cf4874507a0df452f (diff) | |
| download | dslr-dea0f4cdec5bdf24962c8ab3ab2a6473e202259a.tar.gz dslr-dea0f4cdec5bdf24962c8ab3ab2a6473e202259a.tar.bz2 dslr-dea0f4cdec5bdf24962c8ab3ab2a6473e202259a.zip | |
Custom statistics modulde, describe program
Diffstat (limited to 'dslr_notebook.ipynb')
| -rw-r--r-- | dslr_notebook.ipynb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/dslr_notebook.ipynb b/dslr_notebook.ipynb index b226df7..929bb71 100644 --- a/dslr_notebook.ipynb +++ b/dslr_notebook.ipynb @@ -11,7 +11,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 34, "metadata": { "scrolled": false }, @@ -19,10 +19,10 @@ { "data": { "text/plain": [ - "array(['Ravenclaw', 'Slytherin', 'Gryffindor', 'Hufflepuff'], dtype=object)" + "1251" ] }, - "execution_count": 1, + "execution_count": 34, "metadata": {}, "output_type": "execute_result" } @@ -35,7 +35,12 @@ "df = pd.read_csv(\"./datasets/dataset_train.csv\")\n", "df.drop(columns=[\"Index\"], inplace=True)\n", "df.dropna(inplace=True)\n", - "df['Hogwarts House'].unique()" + "df.columns = df.columns.str.lower()\n", + "df.columns = df.columns.str.replace(' ', '_')\n", + "df.rename(columns={'hogwarts_house': 'house'}, inplace=True)\n", + "df.describe()\n", + "df['arithmancy'][df['arithmancy'] == 48793.000000]\n", + "len(df['arithmancy'])" ] }, { |
