Question: Need to code a bit of Python to iterate through the data provided, and draw a text-mode bar chart with lines like this: 12/31/2017 01:30
Need to code a bit of Python to iterate through the data provided, and draw a text-mode bar chart with lines like this:
12/31/2017 01:30 * 12/31/2017 09:30 ****** 12/31/2017 10:30 **********
Each line will look similar to this: the date and time string, followed by a space, followed by the number of asterisks corresponding to the count in the tuple for that date time.
data = [ (2,"12/21/2017 21:30"), (8,"12/21/2017 22:30"), (1,"12/22/2017 00:30"), (1,"12/22/2017 01:30"), (1,"12/22/2017 03:30"), (2,"12/22/2017 05:30"), (8,"12/22/2017 06:30"), (3,"12/22/2017 07:30"), (2,"12/22/2017 08:30"), ]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
