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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Python custom table visual scrollable?

Hello everyone,

 

I am new to Python and Power BI so I hope someone can help me.

 

I created a simple custom Table using Python in Power BI:

 

import pandas as pd 
import matplotlib.pyplot as plt

fig, ax = plt.subplots() 
ax.set_axis_off() 
table = ax.table( 
    cellText = datatset.values,
    rowLabels = dataset.index,
    rowLoc = 'left',
    colLabels = dataset.columns, 
    cellLoc ='center',  
    loc ='upper left')         
   
fig.tight_layout()
plt.show()

 

The problem right now is that I would like to visualise many rows. In my custom table visual my data is displayed in a very condensed form because the table is not scrollable.

 

Is there a way to make a Python table visual in Power BI scrollable?

 

Thank you very much!

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

 

It may caused by this attributes:

fig.tight_layout()

Please delete it and have a try again.

 

And there is a data size limitation for Python visuals in Power BI Desktop: Data used by the Python visual for plotting is limited to 150,000 rows. If more than 150,000 rows are selected, only the top 150,000 rows are used and a message is displayed on the image. Additionally, the input data has a limit of 250 MB.

 

Refer to:

Tight Layout guide — Matplotlib 3.1.2 documentation

Create Power BI visuals using Python in Power BI Desktop - Power BI | Microsoft Docs

Solved: Python padding - Microsoft Power BI Community

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi @Anonymous,

 

thanks for your reply!

 

My input data contains approximately 200 rows and is less than 250 MB. So in general, no error occurs when trying to use the Python visual.

Also, once I remove fig.tight_layout() the table is just cutoff after 25 rows and the first column is not depicted completely. Is there a way to fix this and make the table scrollable in order to show all 200 rows?

 

Thanks in advance!

 

Anonymous
Not applicable

Hi,

 

Was this ever solved, I am facing a imilar issue too

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.