ElectricityLCI
ElectricityLCI copied to clipboard
Error in calculate_plant_efficiency
The method, calculate_plant_efficiency
in eia923_generation.py returns a data frame with duplicated strings in their respective columns (e.g., 'Plant Name', 'State', 'Reported Fuel Type Code'). This caused by the use of a single aggregation method, sum, used during the pandas.groupy call. The summation of string elements is to duplicate them (e.g,. "ALALAL" for three rows with "AL" for their state). This error propagates through the rest of the code.
https://github.com/USEPA/ElectricityLCI/blob/2232c41f2cb4fd333ad59c8710aa55906e6a7ed3/electricitylci/eia923_generation.py#L333