Skip to content

Instantly share code, notes, and snippets.

@kjam
Last active October 17, 2016 19:10
Show Gist options
  • Save kjam/022304c1590e46a5f361ea0e9d4b78d7 to your computer and use it in GitHub Desktop.
Save kjam/022304c1590e46a5f361ea0e9d4b78d7 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"count 38119.000000\n",
"mean 66564.421924\n",
"std 44053.783972\n",
"min 0.000000\n",
"25% NaN\n",
"50% NaN\n",
"75% NaN\n",
"max 318835.490000\n",
"Name: BasePay, dtype: float64"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pd.to_numeric(latest_salaries['BasePay'], errors='coerce').describe()"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"base_pay_series = pd.to_numeric(latest_salaries['BasePay'], errors='coerce') "
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"(20074,)"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"base_pay_series[base_pay_series * .7 < average_yearly_rent].shape"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"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.4.3"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment