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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.