1

I have Series names "rows" in DataFrame in Python like this:

enter image description here

The type of this column is "int64" my question is how can I build interacvite Box plot something like below, which will show me max, min and so on values, probably there have to be use :

import plotly.graph_objs as go
import plotly.offline as py

:

enter image description here

1 Answer 1

2

You can use the Box option from plotly graph objects to get the desired box plot

import plotly.graph_objects as go

fig = go.Figure()

fig.add_trace(go.Box(y=rows)) # if the series is independent of any dataframe

fig.show()

If your series is part of a dataframe, you can use the following

import plotly.graph_objects as go

fig = go.Figure()

fig.add_trace(go.Box(y=df['rows'])) # if the series is part of dataframe, df

fig.show()

Hope this helped

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

2 Comments

yes it heps, but how can I change title of this graph and name of both axis ?
you can use this reference from plotly plotly.com/python/creating-and-updating-figures basically, the 'data'part of the figure is done here, and you need to update the 'layout

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.