Jupyter Plotly Broken v3.0

__IPYTHON__

Downgrade Plotly to version 2, 3.1.0 giving issues as https://github.com/santosjorge/cufflinks/issues/119

%%sh
pip install 'plotly<=2.7.0'
%%sh
pip install pandas xlrd
pip install cufflinks
import plotly.offline as pyo
#allows us to create the Data and Figure objects
from plotly.graph_objs import *
#plotly.plotly pushes your charts to the cloud  
import plotly.plotly as py
import plotly.figure_factory as ff
from plotly import tools
from plotly.figure_factory import create_table as tbl
import pandas as pd
import numpy as np
import warnings
import cufflinks as cf
cf.go_offline()
cf.set_config_file(theme='white')
warnings.filterwarnings('ignore')
Original-tweets_new.xlsx
df = pd.read_excel(Original-tweets_new.xlsx, 
                   sheet_name='Clean Data', encoding='utf-8')

senti_df = df[['Tweet', 'Annotation/Type', 'S/A']]
senti_df.iloc[:, 1:] = senti_df.iloc[:, 1:].apply(lambda x: x.str.lower())

senti_df.rename(columns={'Annotation/Type': 'Annotation'}, inplace=True)
senti_df.head()
(senti_df['S/A']
 .value_counts()
 .reset_index()
 .iplot(kind='pie', labels='index', values='S/A', textinfo='value+percent', 
        pull=0.05, title='Distribution of Sentiments'))
© 2018 Nextjournal GmbH