mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-23 18:14:19 -08:00
added index for change between census tracts as one confounding explanation for percent change in population demographics
This commit is contained in:
parent
c6985dbfba
commit
679501ab43
3 changed files with 3172 additions and 23 deletions
|
@ -1001,7 +1001,7 @@
|
||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.9.6"
|
"version": "3.7.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
|
|
@ -2397,28 +2397,8 @@
|
||||||
"# these are not converted into percent 0 - 100 scale\n",
|
"# these are not converted into percent 0 - 100 scale\n",
|
||||||
"percent_cols = [x for x in combined_df_percent_cols_df.columns if \n",
|
"percent_cols = [x for x in combined_df_percent_cols_df.columns if \n",
|
||||||
" 'Percent' in x or '(percent)' in x\n",
|
" 'Percent' in x or '(percent)' in x\n",
|
||||||
" ]"
|
" ]\n",
|
||||||
]
|
"\n",
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": 43,
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [
|
|
||||||
{
|
|
||||||
"name": "stderr",
|
|
||||||
"output_type": "stream",
|
|
||||||
"text": [
|
|
||||||
"/Users/sarahluw/justice-40-main/justice40-tool/data/data-pipeline/justifce-40-main-env/lib/python3.7/site-packages/pandas/core/frame.py:3641: SettingWithCopyWarning: \n",
|
|
||||||
"A value is trying to be set on a copy of a slice from a DataFrame.\n",
|
|
||||||
"Try using .loc[row_indexer,col_indexer] = value instead\n",
|
|
||||||
"\n",
|
|
||||||
"See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n",
|
|
||||||
" self[k1] = value[k2]\n"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"source": [
|
|
||||||
"combined_df_percent_cols_df[\n",
|
"combined_df_percent_cols_df[\n",
|
||||||
" percent_cols] = combined_df_percent_cols_df[\n",
|
" percent_cols] = combined_df_percent_cols_df[\n",
|
||||||
" percent_cols].apply(lambda x: x * 100)"
|
" percent_cols].apply(lambda x: x * 100)"
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue