2

I have a dataframe and wanted to create a line chart on one of the columns using plotly.

I have the following code but its not working

df['col1'].iplot(kind='scatter', filename='cufflinks/cf-simple-line')

Can anyone see why? I'm not sure if I should use .offline or not

1 Answer 1

1

With cf.go_offline() code run as expected:

import plotly.offline as py
import plotly.graph_objs as go
import pandas as pd
import cufflinks as cf

cf.go_offline()

df0 = pd.DataFrame({"fruits": ["apple", "mango", "lime"],
                    "number of sold items": [20, 26, 32]})

df0["fruits"].iplot(kind="scatter", filename="lineplot-with-cufflinks")

Output: Simple plot

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.