on-internet
← Community

Plotting a pie chartof value_counts() using plotly express

Stack Overflow ·

How does one plot a pie for value_counts() using plotly express for the following series: import pandas as pd import string, random s = pd.Series(random.choice(string.ascii_uppercase) for _ in range(100)) I can see that it can be done through go using: import plotly.graph_objects as go go.Figure(data=[go.Pie(labels=s.value_counts().index, values=s.value_counts().values)])

Comments

Sign in or sign up to comment and upvote.

No comments yet.