Post Reply 
Python (Glitch) & 'plotly.express' library
10-14-2023, 05:38 PM
Post: #4
RE: Python (Glitch) & 'plotly.express' library
You'll want to use pandas to do the data manipulation, and then plotly to plot the results.

Say you have a data frame like

Code:
data = {
    'product': ['Laptop', 'Smartphone', 'Headphones', 'Monitor', 'Mouse'],
    'price': [1000, 800, 150, 300, 50],
    'quantity': [5, 10, 20, 8, 30]
}

To generate a "sales" column,

Code:
data["sales"] = data["price"] * data["quantity"]

And then you can plot the results with plotly express.

ChatGPT is fluent in pandas and very useful for learning how to do more sophisticated dataframe manipulations, or for remembering all the plotly incantations.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Python (Glitch) & 'plotly.express' library - drbarnack - 10-14-2023 05:38 PM



User(s) browsing this thread: 1 Guest(s)