I have written the following code, and I get what I need. However, I am wondering whether there\'s an easier/efficient way of achieving the same.
job_hist.groupby