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
Now this is tricky and I guess does not come up too often, but do you see an easy fix or did similar issues come up with other queries?
The text was updated successfully, but these errors were encountered:
fleimgruber
changed the title
year_limited: error on combining yearly data frames
year_limited: error on combining data frames with different column indices
May 28, 2021
Ran into that issue as well … happens when you query over specific transition dates.
One way to solve this, is to force (ie construct if necessary) two levels in the columns multi-index. This requires the second column level (Aggregated/Consumption) to be standardized. I have no clue if this is the case…
Op 28 mei 2021 om 14:56 heeft fleimgruber ***@***.***> het volgende geschreven:
Reproducer:
def test_pv_germany():
load_dotenv()
API_KEY = os.getenv("ENTSOE_API_KEY")
client = EntsoePandasClient(api_key=API_KEY)
tz = "Europe/Berlin"
start = pd.Timestamp("20180101", tz=tz)
end = pd.Timestamp("20190102", tz=tz)
country_code = "DE"
df = client.query_generation(
country_code, start=start, end=end, process_type="A16", psr_type="B16"
)
print(df.head())
The problematic statement is
df = pd.concat(frames, sort=True)
where it fails with the error
AttributeError: 'NoneType' object has no attribute 'is_extension'
because frames has two dataframes where column labels do not match
frames[0].columns
MultiIndex([('Solar', 'Actual Aggregated'),
('Solar', 'Actual Consumption')],
)
frames[1].columns
Index(['Solar'], dtype='object')
Now this is tricky and I guess does not come up too often, but do you see an easy fix or did similar issues come up with other queries?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Reproducer:
The problematic statement is
where it fails with the error
because
frames
has two dataframes where column labels do not matchNow this is tricky and I guess does not come up too often, but do you see an easy fix or did similar issues come up with other queries?
The text was updated successfully, but these errors were encountered: