Difference between revisions of "Python, Excel Individual Commands"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
fig = px.pie(active_posts[['username', 'Messages posted']], values='Messages posted', names='username') | fig = px.pie(active_posts[['username', 'Messages posted']], values='Messages posted', names='username') | ||
fig.show() | fig.show() | ||
'' active_posts has the data, username is a column also messages posted'' | ''' active_posts has the data, username is a column also messages posted''' | ||
==[[#top|Back To Top]] - [[Python|Main Category]]/[[Python_Excel_Related| Excel Category]]== | ==[[#top|Back To Top]] - [[Python|Main Category]]/[[Python_Excel_Related| Excel Category]]== | ||
[[Category:Python]] | [[Category:Python]] |
Revision as of 18:19, 11 September 2020
Creating a pie chart from data
import plotly.express as px ## pip install plotly fig = px.pie(active_posts'username', 'Messages posted', values='Messages posted', names='username') fig.show()
active_posts has the data, username is a column also messages posted