Skip to content

Commit

Permalink
Updated SchoolAnalysis1.pynb
Browse files Browse the repository at this point in the history
Modified script includes some more comments about the data cleaning, and exports the cleaned data so that further analysis don't require repeating the process.
  • Loading branch information
celestedrobinson committed Jan 14, 2017
1 parent 7400fce commit 20631b7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions SchoolAnalysis1.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The dataset is from data.utah.gov, and contains the grades of schools around Utah in terms of standardized tests. This script cleans the data (removes NaNs from columns that will be used for analysis in the future), and creates new columns that have percentages of points earned in different categories for more simple comparisons."
]
},
{
"cell_type": "code",
"execution_count": 13,
Expand Down Expand Up @@ -209,6 +216,24 @@
" print(percent_columns[i], '\\nmean: ', means[i], '\\tmedian: ', medians[i], '\\tmax: ', maxes[i], '\\tmin: ', mins[i], '\\tvariance: ', variances[i])\n",
"print(\"Rows: \", school.shape[0])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Since we have made some changes to the csv, we can export it so that we only have to upload it in future scripts without cleaning it again (and again)."
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"school.to_csv('filtered_data.csv')"
]
}
],
"metadata": {
Expand Down

0 comments on commit 20631b7

Please sign in to comment.