Draw bar graphs and line graphs with matplotlib

Asked 1 years ago, Updated 1 years ago, 211 views

Hello, everyone, I still don't understand how to use Pandas data frame, so I'm asking you even though it's a simple code. Thank you in advance.

You want to recall the following table and draw a graph.

The data corresponding to the Document is a bar graph, You want to draw the data corresponding to Comments as a line graph.

I've googled this and that, and they usually create a data frame from the beginning and draw a graph.

How should I object assignments be made for this data, especially for the pivot table?

Thank you.

python matplotlib dataframe pandas

2023-03-31 00:25

1 Answers

df_doc = df[df["type"] == "Document"]
df_cmt = df[df["type"] == "Comments"]

Can't we separate it and draw it separately?


2023-04-01 23:39

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.