Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
bobkatla committed Aug 23, 2024
1 parent 15ebce3 commit d2ae3d5
Showing 1 changed file with 3 additions and 97 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,24 +201,9 @@
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 34,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"-1\n",
"('dwelltype', 'Flat or Apartment')\n",
"-2\n",
"('dwelltype', 'Separate House')\n",
"-3\n",
"('dwelltype', 'Separate House')\n",
"-3\n",
"('dwelltype', 'Separate House')\n"
]
}
],
"outputs": [],
"source": [
"check_df = final_df_census_hh.astype(int) < 0\n",
"dict_to_process = {}\n",
Expand All @@ -240,91 +225,12 @@
" final_df_census_hh.loc[i, sub_check.idxmax()] -= to_add_del_val\n",
" print(f\"New value in {(att, state)}: {final_df_census_hh.loc[i, (att, state)]}\")\n",
" print(f\"New value in {sub_check.idxmax()}: {final_df_census_hh.loc[i, sub_check.idxmax()]}\")\n",
"\n",
" \n",
" # print(final_df_census_hh.loc[i, loc_cols])\n",
"\n",
"# for idx, ls_cols in dict_to_process.items():\n",
"# print(idx, ls_cols)\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"zone_id None 3942\n",
"sample_geog None 2\n",
"hhsize 1 341\n",
" 2 542\n",
" 3 102\n",
" 4 108\n",
" 5 45\n",
" 6 5\n",
" 7 0\n",
" 8+ 55\n",
"dwelltype Flat or Apartment -3\n",
" Missing 0\n",
" Other -3\n",
" Separate House 1191\n",
" Terrace/Townhouse 13\n",
"hhinc 1-149 19\n",
" 1000-1249 99\n",
" 1250-1499 84\n",
" 150-299 25\n",
" 1500-1749 56\n",
" 1750-1999 64\n",
" 2000-2499 121\n",
" 2500-2999 69\n",
" 300-399 30\n",
" 3000-3499 78\n",
" 3500-3999 31\n",
" 400-499 65\n",
" 4000-4499 23\n",
" 4500-4999 71\n",
" 500-649 55\n",
" 5000-5999 54\n",
" 6000-7999 50\n",
" 650-799 83\n",
" 800-999 66\n",
" 8000+ 22\n",
" Negative income 9\n",
" Nil income 24\n",
"totalvehs 0 34\n",
" 1 416\n",
" 2 550\n",
" 3 141\n",
" 4+ 57\n",
"owndwell Being Purchased 317\n",
" Being Rented 152\n",
" Fully Owned 694\n",
" Something Else 35\n",
"Name: 3942, dtype: object"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"final_df_census_hh.loc[\"3942\", :]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 35,
"metadata": {},
"outputs": [],
"source": [
Expand Down

0 comments on commit d2ae3d5

Please sign in to comment.