-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
1,266 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"metadata": { | ||
"name": "Untitled0" | ||
}, | ||
"nbformat": 3, | ||
"nbformat_minor": 0, | ||
"worksheets": [ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"collapsed": false, | ||
"input": "%matplotlib inline\nimport pandas as pd\ndata = pd.read_csv(\"emdata-tsv (1).csv\")\n ", | ||
"language": "python", | ||
"metadata": {}, | ||
"outputs": [], | ||
"prompt_number": 16 | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"collapsed": false, | ||
"input": "data.describe()\ndata.shape\ndata.Country.describe()\ndata.Type.describe()", | ||
"language": "python", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"metadata": {}, | ||
"output_type": "pyout", | ||
"prompt_number": 18, | ||
"text": "count 17828\nunique 15\ntop Transport Accident\nfreq 4351\nName: Type, dtype: object" | ||
} | ||
], | ||
"prompt_number": 18 | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"collapsed": false, | ||
"input": "data.describe()", | ||
"language": "python", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"html": "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>Start</th>\n <th>End</th>\n <th>Duration</th>\n <th>Killed</th>\n <th>Cost</th>\n <th>Affected</th>\n <th>Column 12</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>count</th>\n <td> 17828.000000</td>\n <td> 17828.000000</td>\n <td> 17828.000000</td>\n <td> 13996.000000</td>\n <td> 1.108500e+04</td>\n <td> 3772.000000</td>\n <td> 0</td>\n </tr>\n <tr>\n <th>mean</th>\n <td> 1990.883049</td>\n <td> 1990.918387</td>\n <td> 0.035338</td>\n <td> 2718.355173</td>\n <td> 5.586713e+05</td>\n <td> 488.759659</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>std</th>\n <td> 17.851370</td>\n <td> 17.836943</td>\n <td> 0.302913</td>\n <td> 75162.832728</td>\n <td> 6.951056e+06</td>\n <td> 3384.235083</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>min</th>\n <td> 1900.000000</td>\n <td> 1900.000000</td>\n <td> 0.000000</td>\n <td> 1.000000</td>\n <td> 1.000000e+00</td>\n <td> 0.003000</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>25%</th>\n <td> 1986.000000</td>\n <td> 1986.000000</td>\n <td> 0.000000</td>\n <td> 12.000000</td>\n <td> 6.000000e+01</td>\n <td> 5.000000</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>50%</th>\n <td> 1996.000000</td>\n <td> 1996.000000</td>\n <td> 0.000000</td>\n <td> 24.000000</td>\n <td> 1.000000e+03</td>\n <td> 35.000000</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>75%</th>\n <td> 2003.000000</td>\n <td> 2003.000000</td>\n <td> 0.000000</td>\n <td> 57.000000</td>\n <td> 1.975000e+04</td>\n <td> 200.000000</td>\n <td>NaN</td>\n </tr>\n <tr>\n <th>max</th>\n <td> 2008.000000</td>\n <td> 2009.000000</td>\n <td> 9.000000</td>\n <td> 5000000.000000</td>\n <td> 3.000000e+08</td>\n <td> 125000.000000</td>\n <td>NaN</td>\n </tr>\n </tbody>\n</table>\n<p>8 rows \u00d7 7 columns</p>\n</div>", | ||
"metadata": {}, | ||
"output_type": "pyout", | ||
"prompt_number": 19, | ||
"text": " Start End Duration Killed Cost \\\ncount 17828.000000 17828.000000 17828.000000 13996.000000 1.108500e+04 \nmean 1990.883049 1990.918387 0.035338 2718.355173 5.586713e+05 \nstd 17.851370 17.836943 0.302913 75162.832728 6.951056e+06 \nmin 1900.000000 1900.000000 0.000000 1.000000 1.000000e+00 \n25% 1986.000000 1986.000000 0.000000 12.000000 6.000000e+01 \n50% 1996.000000 1996.000000 0.000000 24.000000 1.000000e+03 \n75% 2003.000000 2003.000000 0.000000 57.000000 1.975000e+04 \nmax 2008.000000 2009.000000 9.000000 5000000.000000 3.000000e+08 \n\n Affected Column 12 \ncount 3772.000000 0 \nmean 488.759659 NaN \nstd 3384.235083 NaN \nmin 0.003000 NaN \n25% 5.000000 NaN \n50% 35.000000 NaN \n75% 200.000000 NaN \nmax 125000.000000 NaN \n\n[8 rows x 7 columns]" | ||
} | ||
], | ||
"prompt_number": 19 | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"collapsed": false, | ||
"input": "print data.Killed.groupby(data.Type).sum().order()", | ||
"language": "python", | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"output_type": "stream", | ||
"stream": "stdout", | ||
"text": "Type\nWildfire 3287\nMass movement dry 4919\nIndustrial Accident 49797\nMass movement wet 55040\nMiscellaneous accident 58121\nVolcano 95979\nExtreme temperature 108938\nTransport Accident 201053\nStorm 1373104\nEarthquake (seismic activity) 2311491\nComplex Disasters 5610000\nFlood 6911040\nEpidemic 9555059\nDrought 11708271\nInsect infestation NaN\ndtype: float64\n" | ||
} | ||
], | ||
"prompt_number": 23 | ||
} | ||
], | ||
"metadata": {} | ||
} | ||
] | ||
} |
Oops, something went wrong.