<jupyter_start><jupyter_text>Plotly is a library that allows you to create interactive plots that you can use in dashboards or websites (you can save them as html files or static images). InstallationIn order for this all to work, you'll need to install plotly and cufflinks to call plots directly off of a pandas dataframe. These libraries are not currently available through **conda** but are available through **pip**. Install the libraries at your command line/terminal using:    pip install plotly    pip install cufflinks Importing and Setting-up<jupyter_code>import pandas as pd
import numpy as np
%matplotlib inline
from plotly import __version__
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
import cufflinks as cf
# For Notebooks
init_notebook_mode(connected=True)
# For offline use
cf.go_offline()
df = pd.DataFrame(np.random.randn(100,4),columns='A B C D'.split())
df.head()
df2 = pd.DataFrame({'Category':['A','B','C'],'Values':[32,43,50]})
df2.head()<jupyter_output><empty_output><jupyter_text>Using Cufflinks and iplot()* scatter* bar* box* spread* ratio* heatmap* surface* histogram* bubble<jupyter_code># plot x='A', y='B'
df.iplot(kind='scatter',x='A',y='B',mode='markers',size=10)
# plot df2 x='Category', y='Values'
df2.iplot(kind='bar',x='Category',y='Values')
df.count().iplot(kind='bar')
df.iplot(kind='box')
df3 = pd.DataFrame({'x':[1,2,3,4,5],'y':[10,20,30,20,10],'z':[5,4,3,2,1]})<jupyter_output><empty_output><jupyter_text>3d surface<jupyter_code>df3.iplot(kind='surface',colorscale='rdylbu')
# plot df['A'] and df['B']
df[['A','B']].iplot(kind='spread')
# plot df['A']
df['A'].iplot(kind='hist',bins=25)
# df
df.scatter_matrix()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15832363213038417, 'fraction_numerical': 0.023864959254947613, 'mean_word_length': 7.725888324873097, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '516178', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 634, 'n_tokens_neox': 604, 'n_words': 158, 'path': 'Exercises - Qasim/Python. Pandas, Viz/Exercise 24 (Plotly and Cufflinks) - answer Q.ipynb', 'repo_name': 'k21k/Python-Notes', 'size': '1718'}