<jupyter_start><jupyter_text>Cufflinks and PlotlyO Plotly é uma lib que permite criar gráficos interativos que você pode usar em painéis ou sites(pode salvá-los como arquivos html ou imagens estáticas) InstalaçãoInstall Plot.ly: conda install -c plotly plotlyhttps://plotly.com/python/Install Cufflinks: conda install -c conda-forge cufflinks-pyhttps://github.com/santosjorge/cufflinks<jupyter_code># Import Pandas, Numpy and Matplotlib

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
# import Plotly

from plotly import __version__
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
print(__version__)

# Import Cufflinks

import cufflinks as cf
# For Notebooks
init_notebook_mode(connected=True)

# For offline use
cf.go_offline()
# Create Dataframes

df = pd.DataFrame(np.random.randn(100,4),columns='A B C D'.split())
print(df.head())
print()

df2 = pd.DataFrame({'Categoria':['A','B','C'],'Valores':[32,43,50]})
print(df2.head())
print()<jupyter_output>A         B         C         D
0 -0.282087 -0.925286 -0.968164  1.516623
1  0.260953 -0.685824  0.001199 -0.104643
2  0.487230  0.382440 -0.108229 -1.031485
3 -0.543944  0.200560  0.955726 -0.471788
4  0.462134 -0.869030  0.143812  0.083503

  Categoria  Valores
0         A       32
1         B       43
2         C       50<jupyter_text>Use Cufflinks and iplot ()* Dispersão* Barras* BoxPlot* Spreads* Proporção* Mapa de calor* Superfícies 3D* Histograma* Bolha  Dispersão<jupyter_code>df.iplot(kind='scatter',x='A',y='B',mode='markers',size=10)<jupyter_output><empty_output><jupyter_text>Plots de barra<jupyter_code>df2.iplot(kind='bar',x='Categoria',y='Valores')
df.count().iplot(kind='bar')<jupyter_output><empty_output><jupyter_text>Boxplots<jupyter_code>df.iplot(kind='box')<jupyter_output><empty_output><jupyter_text>Superfícies 3D<jupyter_code>df3 = pd.DataFrame({'x':[1,2,3,4,5],'y':[10,20,30,20,10],'z':[5,4,3,2,1]})
df3.iplot(kind='surface',colorscale='rdylbu')<jupyter_output><empty_output><jupyter_text>Spread<jupyter_code>df[['A','B']].iplot(kind='spread')<jupyter_output>C:\Users\david\anaconda3\lib\site-packages\cufflinks\plotlytools.py:849: FutureWarning:

The pandas.np module is deprecated and will be removed from pandas in a future version. Import numpy directly instead

C:\Users\david\anaconda3\lib\site-packages\cufflinks\plotlytools.py:850: FutureWarning:

The pandas.np module is deprecated and will be removed from pandas in a future version. Import numpy directly instead<jupyter_text>Histograma<jupyter_code>df['A'].iplot(kind='hist',bins=25)<jupyter_output><empty_output><jupyter_text>Bolha<jupyter_code>df.iplot(kind='bubble',x='A',y='B',size='C')<jupyter_output><empty_output><jupyter_text>scatter_matrix()Similar à sns.pairplot()<jupyter_code>df.scatter_matrix()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13585434173669467, 'fraction_numerical': 0.07107843137254902, 'mean_word_length': 6.269720101781171, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 2, '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': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '353698', 'license': 'MIT', 'n_tokens_mistral': 1237, 'n_tokens_neox': 1124, 'n_words': 203, 'path': 'scripts_matplotlib_seaborn/Cufflinks_and_Plotly.ipynb', 'repo_name': 'davidcoelho89/MLTool_python', 'size': '2856'}