You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the read_eia923_fuel_receipts method in coal_upstream.py, Page 5 of the EIA923 Excel workbook is saved to CSV. The header columns include a new line character "\n" for the following coal min columns:
Coalmine\nType
Coalmine\nState
Coalmine\nCounty
Coalmine\nMsha Id
When written to CSV, these headers are all truncated to "Coalmine," dropping the context after the newline. This results in a CSV file with four columns all of the same name and causes errors with merging.
In the read_eia923_fuel_receipts method in coal_upstream.py, Page 5 of the EIA923 Excel workbook is saved to CSV. The header columns include a new line character "\n" for the following coal min columns:
When written to CSV, these headers are all truncated to "Coalmine," dropping the context after the newline. This results in a CSV file with four columns all of the same name and causes errors with merging.
ElectricityLCI/electricitylci/coal_upstream.py
Line 90 in e562681
To fix, consider running the data frame through the
_clean_columns
method before writing to CSV.A symptom of this is a 'KeyError' on key 'fuel_group', accessed in generate_upstream_coal_map from the data frame returned by read_eia_fuel_receipts.
The text was updated successfully, but these errors were encountered: