Skip to content

Instantly share code, notes, and snippets.

@isc-rsingh
Created August 1, 2017 19:43
Show Gist options
  • Save isc-rsingh/d5f8a4959b5f6d661d2e69b387d4dd82 to your computer and use it in GitHub Desktop.
Save isc-rsingh/d5f8a4959b5f6d661d2e69b387d4dd82 to your computer and use it in GitHub Desktop.
urban_df['CAT'] = 'EXURBAN'
urban_df['CAT'][(urban_df['POPPERKMSQ'] >= 2900)] = 'URBAN'
urban_df['CAT'][(urban_df['POPPERKMSQ'] < 2900) & (urban_df['POPPERKMSQ'] >= 100) & (urban_df['MEDYRBUILT'] < 1980) & (urban_df['MEDYRBUILT'] >= 1946)] = 'SUBURBANEARLY'
urban_df['CAT'][(urban_df['POPPERKMSQ'] < 2900) & (urban_df['POPPERKMSQ'] >= 100) & (urban_df['MEDYRBUILT'] >= 1980)] = 'SUBURBANLATE'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment