Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hi everyone,
I need help with python visuals. The following script works fine in jupiter notebook, but I face an issue when passing it to PBI Ithe plotting part). It plots (displays a picture) in a separate HTML page rather than in the framework itself.
Any idea on how to get the picture in the PBI page ?
Thanks in advance. V.
import pandas as pd
from pandas_datareader import data
import pandas_datareader as pdr
import datetime as dt
import seaborn as sns
from dateutil.relativedelta import relativedelta
import pandas_datareader.data as web
import plotly.graph_objects as go
import pandas_datareader.data as web
# getting yahoo data
end = dt.date.today()
start = end - relativedelta(months=3)
df = web.DataReader('AAPL','yahoo',start,end)
df.reset_index(inplace=True)
# polotting it
fig = go.Figure(data=[go.Candlestick(x=df['Date'],
open=df['Open'],
high=df['High'],
low=df['Low'],
close=df['Close'], increasing_line_color= 'cyan', increasing_line_width = 1,decreasing_line_color= 'gray')])
fig.update_layout(title_text='AAPL STOCKS',
title_font_size=20, title_font_color = 'red',
yaxis_title='USD' , yaxis_title_font_color ='black', xaxis_title=' DATE', plot_bgcolor='azure')
fig.update_xaxes(showgrid=True, gridwidth=1, gridcolor='grey')
fig.update_yaxes(showgrid=True, gridwidth=1, gridcolor='grey')
fig.show()
You may check if the post below helps.
Hi, thanks for the reply, not quite….. I do not have a problem downloading the data with Python, and even visualizing goes well – the only problem is that it displays it in the separate HTML page rather than the PBI page itself.
V.
| User | Count |
|---|---|
| 23 | |
| 19 | |
| 19 | |
| 17 | |
| 11 |
| User | Count |
|---|---|
| 55 | |
| 54 | |
| 40 | |
| 40 | |
| 30 |