Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Creating Python Visuals



Hoping someone can help me.


I'm trying to create a custom Python visual (ridge plot) using the following fields :

(The Compliance (data type: Text) and Assignment Number (data type: Text)  fields are from 2 different tables)

# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script:

dataset = pandas.DataFrame(Compliance, Assignment Number)
dataset = dataset.drop_duplicates()
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd

# Paste or type your script code here:
ridge_plot = sns.FacetGrid(dataset, row="Compliance", hue="Compliance", aspect=5, height=1.25)
# Use map function to make density plot in each element of the grid., "Assignment Number", clip_on=False, shade=True, alpha=0.7, lw=4, bw_method=.2), y=0, lw=4, clip_on=False)
When I try to create the visual, I get the below error:

I have two questions:


Can I create a dataset, for my Python custom visual, from 2 tables that have a one-many relationship ?


Also do you know why I'm getting the above error ?


Many thanks


Also do you know why I'm getting the above error ?

Advocate II
Advocate II

Hi, can you create your visual in a jupyter notebook, or visual code? 

do you have a drawing of the plot you want to make? I don't get it 


i have a ridgeplot but in R, that i use in PowerBi , although data is from same dataframe


It takes dates and a value, and month for y.axis . Color is a scale gradiente with value as input

Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors