python-visuals

Create matplotlib and seaborn Python visuals for Power BI PBIR reports.

887|131|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/data-goblin/power-bi-agentic-development --skill python-visuals
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-visuals
Source: https://github.com/data-goblin/power-bi-agentic-development/tree/main/plugins/custom-visuals/skills/python-visuals
Command: npx skills add https://github.com/data-goblin/power-bi-agentic-development --skill python-visuals

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires matplotlib, seaborn, numpy, pandas, and includes references (resource) components.

What problem does it solve?

Building Python script visuals in Power BI requires knowing the PBIR JSON format, the auto-injected dataset DataFrame behavior, supported package versions, and strict rendering rules like the mandatory plt.show() call. This Skill guides an AI agent through creating, injecting, and validating Python visuals in PBIR reports without hand-editing report JSON.

Core Features & Use Cases

  • End-to-end visual workflow: Add a pythonVisual via the pbir CLI, write the matplotlib/seaborn script, inject it with pbir visuals python, and validate bindings with pbir validate.
  • Chart pattern library: Ready-made patterns for bar charts, heatmaps, donut charts, KPI cards, scatter plots with regression, histograms with KDE, and box plots, plus complete PBIR visual.json examples.
  • Data model guidance: Explains the 150,000-row deduplicated cap, the 250 MB input limit, and how to force per-row input by binding a unique key column.
  • Use Case: Ask the agent to add a Python visual showing a seaborn heatmap of sales by region and month; it adds the visual, writes the script, injects it into the PBIR report, and validates the result.

Quick Start

Ask the agent to create a Python visual on a report page, for example: add a matplotlib bar chart of revenue by category to my PBIR report.

Frequently Asked Questions about python-visuals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Python visual in a Power BI PBIR report?

Add the visual with `pbir add visual pythonVisual`, write a matplotlib or seaborn script that ends with `plt.show()`, then inject it using `pbir visuals python --script-file chart.py`. Validate bindings afterward with `pbir validate`.

Why is my Python visual blank in Power BI?

The most common cause is a missing `plt.show()` call, which is mandatory as the final line of the script. Also verify the script references columns by their nativeQueryRef display names and that only one figure is rendered.

Which Python packages are supported in the Power BI Service?

The Service supports matplotlib 3.8.4, seaborn 0.13.2, numpy 2.0.0, pandas 2.2.2, scipy 1.13.1, scikit-learn 1.5.0, statsmodels 0.14.2, and pillow 10.4.0 on Python 3.11. Plotly, bokeh, and altair are not supported because networking is blocked.

What is the row limit for Python visuals in Power BI?

Python visuals are capped at 150,000 rows, applied to the deduplicated set of bound Values columns, not the raw fact table. Input is also capped at 250 MB, and individual string values over 32,766 characters are silently truncated.

When should I use a Python visual instead of Deneb or an SVG measure?

Use a Python visual only when the chart requires render-time statistical computation like model fits or forecast bands and has no native or Deneb equivalent. If interactivity or cross-filtering matters, use Deneb; for small inline marks, use an SVG measure.

How do I get row-level data instead of grouped data in the dataset DataFrame?

Bind a guaranteed-unique column, such as a transaction key, to the Values role alongside your other fields. Do not use a measure as the key, since that changes the projection kind and prevents distinct-row expansion.