Plotly Treemap not working? - Python

Hi,

So I’ve been attempting to generate a Treemap using the Plotly docs described here:

However, when I try to generate a basic plot I get the error:

import plotly.graph_objects as go

df = pd.read_csv('keyword-data.csv')

fig = go.Figure(go.Treemap(
    labels = df['Keyword'],
    parents = df['Topic']
))

fig.show()

AttributeError: module ‘plotly.graph_objects’ has no attribute ‘Treemap’

Has the Treemap plot been deprecated? Is there anyway to get it working?

It is a new trace type.
Are you using the latest version?

three reasons why you should buy plotly pro: support open source, get great support, host your plots and dashboards online