Home > Software engineering >  How can plot categorical stacked bar over periodic time?
How can plot categorical stacked bar over periodic time?

Time:10-04

I'm trying to extract a stacked bar chart over periodic time (5 years):

import pandas as pd
categorical = ["RL","CD(others)","DL","ML","ML","ML","DL","ML","DL","DL"]
year = [2014,2014,2015,2015,2016,2017,2019,2021,2022,2022]
df = pd.DataFrame({'year':year,
                   'keywords':categorical})
df

I tried relevant enter image description here

CodePudding user response:

I don't understand the full logic if the provided example is supposed to match the data, but you can use enter image description here

  • Related