I'd like to convert the dates that are in table rows in to table columns. So I'd like to take this output:
Name      | Date     | Consumption
Business A|2021-01-01|12
Business B|2021-01-01|15
Business C|2021-01-01|18
Business A|2021-02-01|10
Business B|2021-02-01|14
Business C|2021-02-01|13
Business A|2021-03-01|23
Business B|2021-03-01|21
Business C|2021-03-01|19
And turn it in to this output:
Name      | Jan-21 | Feb-21 | Mar-21
Business A|12      |10      |23
Business B|15      |14      |21
Business C|18      |13      |19
I'd like to use python and pandas to do it, but I'm very new to pandas and haven't really used it before. This data is stored in a postgresql database.
Any help would be GREATLY appreciated! Thank you in advance!
 
    