catalyst-cooperative / pudl

The Public Utility Data Liberation Project provides analysis-ready energy system data to climate advocates, researchers, policymakers, and journalists.
https://catalyst.coop/pudl
MIT License
456 stars 106 forks source link

pudl.output.eia860.generators_eia860() fails #243

Closed karldw closed 5 years ago

karldw commented 5 years ago

Describe the bug

The generators_eia860 output function fails here because of the column data types.

To Reproduce

My settings.yml loaded in the EIA 860 and 923 data for all available tables and years.

from pudl.output import eia860
eia860.generators_eia860()

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pudl/pudl/output/eia860.py", line 259, in generators_eia860
    on=['plant_id_eia', 'report_date'])
  File ".../python3.7/site-packages/pandas/core/reshape/merge.py", line 61, in merge
    validate=validate)
  File ".../pandas/core/reshape/merge.py", line 555, in __init__
    self._maybe_coerce_merge_keys()
  File ".../pandas/core/reshape/merge.py", line 986, in _maybe_coerce_merge_keys
    raise ValueError(msg)
ValueError: You are trying to merge on datetime64[ns] and float64 columns. 
If you wish to proceed you should use pd.concat

Expected behavior I expected the generators table.

Desktop:

zaneselvans commented 5 years ago

Hey Karl, I suspect this is the same issue as #236 -- for some reason that we haven't chased down yet the output functions all seem to fail unless there's at least one year of FERC data in the DB.

karldw commented 5 years ago

Ah, got it. Thanks!

zaneselvans commented 5 years ago

You might also try doing the same output but using a PudlTabl output object to do it.