Ploting candlestick on jupyternotebook

Hello,

this example from the plotly web is not working:

import plotly.graph_objects as go

import pandas as pd
from datetime import datetime

df = pd.read_csv(‘https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv’)

fig = go.Figure(data=[go.Candlestick(x=df[‘Date’],
open=df[‘AAPL.Open’],
high=df[‘AAPL.High’],
low=df[‘AAPL.Low’],
close=df[‘AAPL.Close’])])

fig.show()

it shows me this error:

AttributeError Traceback (most recent call last)
in
12 close=df[‘AAPL.Close’])])
13
—> 14 fig.show()

AttributeError: ‘Figure’ object has no attribute ‘show’

What should i do to fix it?

Hello @Arthur, which version of plotly are you using?

import plotly
print(plotly.__version__)