a6c04a52a63efc1729062ec2b5c4ef5f8bfddbed,src/pudl/output/eia923.py,,fuel_receipts_costs_eia923,#Any#Any#Any#Any#Any#,129
Before Change
pu_eia = pudl.output.eia860.plants_utils_eia860(pudl_engine,
start_date=start_date,
end_date=end_date)
out_df = pudl.helpers.merge_on_date_year(
frc_df, pu_eia, on=["plant_id_eia"])
// Drop any records where we"ve failed to get the 860 data merged in...
out_df = out_df.dropna(subset=["utility_id_eia", "utility_name_eia"])
if freq is None:
// There are a couple of invalid records with no specified fuel.
out_df = out_df.dropna(subset=["fuel_group_code"])
first_cols = ["report_date",
"plant_id_eia",
"plant_id_pudl",
"plant_name_eia",
"utility_id_eia",
"utility_id_pudl",
"utility_name_eia", ]
// Re-arrange the columns for easier readability:
out_df = pudl.helpers.organize_cols(out_df, first_cols)
// Clean up the types of a few columns...
out_df["plant_id_eia"] = out_df.plant_id_eia.astype(int)
out_df["plant_id_pudl"] = out_df.plant_id_pudl.astype(int)
out_df["utility_id_eia"] = out_df.utility_id_eia.astype(int)
out_df["utility_id_pudl"] = out_df.utility_id_pudl.astype(int)
return out_df
After Change
start_date=start_date,
end_date=end_date)
out_df = (
pudl.helpers.merge_on_date_year(frc_df, pu_eia, on=["plant_id_eia"])
.dropna(subset=["utility_id_eia"])
.pipe(
pudl.helpers.organize_cols,
cols=[
"report_date",
"plant_id_eia",
"plant_id_pudl",
"plant_name_eia",
"utility_id_eia",
"utility_id_pudl",
"utility_name_eia",
]
)
.astype({
"plant_id_eia": "Int64",
"plant_id_pudl": "Int64",
"utility_id_eia": "Int64",
"utility_id_pudl": "Int64",
})
)
if freq is None:
// There are a couple of invalid records with no specified fuel.
out_df = out_df.dropna(subset=["fuel_group_code"])
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 28
Instances
Project Name: catalyst-cooperative/pudl
Commit Name: a6c04a52a63efc1729062ec2b5c4ef5f8bfddbed
Time: 2020-02-13
Author: zane.selvans@catalyst.coop
File Name: src/pudl/output/eia923.py
Class Name:
Method Name: fuel_receipts_costs_eia923
Project Name: catalyst-cooperative/pudl
Commit Name: a6c04a52a63efc1729062ec2b5c4ef5f8bfddbed
Time: 2020-02-13
Author: zane.selvans@catalyst.coop
File Name: src/pudl/output/eia923.py
Class Name:
Method Name: generation_eia923
Project Name: catalyst-cooperative/pudl
Commit Name: a6c04a52a63efc1729062ec2b5c4ef5f8bfddbed
Time: 2020-02-13
Author: zane.selvans@catalyst.coop
File Name: src/pudl/output/eia923.py
Class Name:
Method Name: fuel_receipts_costs_eia923
Project Name: catalyst-cooperative/pudl
Commit Name: a6c04a52a63efc1729062ec2b5c4ef5f8bfddbed
Time: 2020-02-13
Author: zane.selvans@catalyst.coop
File Name: src/pudl/output/eia923.py
Class Name:
Method Name: boiler_fuel_eia923