mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-06 13:04:18 -07:00
parent
e94d05882c
commit
1c0d87d84b
4 changed files with 68 additions and 12 deletions
|
@ -62,12 +62,16 @@ class DOEEnergyBurden(ExtractTransformLoad):
|
|||
)
|
||||
|
||||
# Convert energy burden to a fraction, since we represent all other percentages as fractions.
|
||||
output_df[self.ENERGY_BURDEN_FIELD_NAME] = output_df[self.ENERGY_BURDEN_FIELD_NAME] / 100
|
||||
output_df[self.ENERGY_BURDEN_FIELD_NAME] = (
|
||||
output_df[self.ENERGY_BURDEN_FIELD_NAME] / 100
|
||||
)
|
||||
|
||||
# Left-pad the tracts with 0s
|
||||
expected_length_of_census_tract_field = 11
|
||||
output_df[self.GEOID_TRACT_FIELD_NAME] = output_df[self.GEOID_TRACT_FIELD_NAME].astype(str).apply(
|
||||
lambda x: x.zfill(expected_length_of_census_tract_field)
|
||||
output_df[self.GEOID_TRACT_FIELD_NAME] = (
|
||||
output_df[self.GEOID_TRACT_FIELD_NAME]
|
||||
.astype(str)
|
||||
.apply(lambda x: x.zfill(expected_length_of_census_tract_field))
|
||||
)
|
||||
|
||||
self.output_df = output_df
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue