Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Python in powerbi, missing data

Hi All,

 

I've been trying to load data from the ENTSOE platform (https://github.com/EnergieID/entsoe-py) using python.
Works pretty well using Anaconda/JupyterLab, but when I use the same code in powerbi, some random data just isn't picked up.
Any idea why that could happen?
My original code exports from python to excel and everything loads properly.

I was thinking maybe some format error stops powerbi from loading the data, or maybe memory within the variable (although I tried increasing), or anything else...


The code:

from entsoe import EntsoePandasClient, Area
import pandas as pd
import numpy as np

client = EntsoePandasClient(api_key="f9e2dc92-2ac1-4d27-806c-2382356c9530")

from datetime import datetime
today = datetime.today().strftime('%Y%m%d')

# Start and end points of import
start = pd.Timestamp('20220101', tz='Europe/Berlin')
end = pd.Timestamp(today, tz='Europe/Berlin') 


# Generation volumes

df = client.query_generation('BE', start=start, end=end, psr_type='B14')

# Set index column to correct format
df.index = df.index.strftime('%D/%M/%Y')

# Remove last 6 characters
df.index = df.index.map(lambda x: str(x)[:-8])

--

If going to excel, I add the following:
with pd.ExcelWriter(r'FILELOCATION\FILENAME.xlsx') as writer:
df.to_excel(writer, sheet_name = 'BE_Gen_latest')

2 REPLIES 2
Anonymous
Not applicable

The idea is to not generate excel files and import the data directly through PQ. Any idea why it would be 'skipping' some chunks of data? It's not even randomised as it's always the same pieces missing. 

CNENFRNL
Community Champion
Community Champion

Since it's hard to debug in PQ, import the correct Excel file generated by Python into PQ.


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors