Home > Mobile >  comparing two columns data with same categories in a plot?
comparing two columns data with same categories in a plot?

Time:12-09

I have a dataset where the MaterialState_manual and MaterialState_pipeline feature has the same categories as shown in the table. such as T61, 190c_250 and more. The number of precipitates in column Precipitate_manual is different than the column Prepitates_pipeline.

enter image description here

Now I want to create a hist plot to compare the same category two lines to show Precipitates_manual vs Precipitate_pipeline with all the categories we have in MaterialStates.

What I did here, but does not shows the categories.

%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import pandas


df['Precipitates_manual'].hist()
df['Precipitates_pipeline'].hist()

The output:

enter image description here

What I did in excel but in python still struggling. enter image description here

CodePudding user response:

You could re-shape your dataframe by combining enter image description here

  • Related