[ad_1]
hi and thank you for clearly explaining your inputs and goal.
I’m sorry you’ve been downvoted but don’t take it personally, it’s just feedback to improve your question asking to make it easier for others to help you in future questions you ask. In the future it would be better to include your input as text instead of an image so people can copy and paste your example. I’ve created a test table below in the same format you have and you should be able to easily copy and paste it to see if it works for you now. Also it would improve your question to write what you’ve tried so far
To make the plot you can groupby the tracking_id
and count before using the built-in bar plot.
import pandas as pd
df = pd.DataFrame({
'tracking_id':['A','A','B','C','C'],
'end_date':['2000','2001','2002','2003','2004'],
'start_date':['1900','1901','1902','1903','1904'],
'period_length':[1,2,3,4,5],
})
here is what the test table I made above looks like
df.groupby('tracking_id')['tracking_id'].count().plot.bar()
[ad_2]