Home > Software design >  Create a 100% stacked bar chart
Create a 100% stacked bar chart

Time:08-20

I have the following table:

 ------------- -------- ----- 
|       fields|  Status|count|
 ------------- -------- ----- 
|     LastName|complete|27399|
|         Race| missing|  146|
|        Email| missing|24225|
|      MidName|complete|26078|
|StreetAddress|complete|27269|
|        Phone| missing|   59|
|        State| missing|   28|
|    FirstName|complete|27399|
|       Gender|complete|27403|
|   Expiration|complete|14017|
|StreetAddress| missing|  134|
 ------------- -------- ----- 

And I would like to create a stacked bargraph with unique values of status on x-axis stacked by status with values from the count.

I have been played around with simple ones:

per_df.plot(kind='bar',stacked=True)

and also tried seaborn

  sns.barplot(data=data, x='fields',y='status')
  plt.tight_layout()
  plt.show()

I also tried several other ways, that I already deleted.

I also checked on the following:

enter image description here

  • Related