'Write pivot table in Excel

Is there a python library that supports writing a pivot table in Excel? For example, I usually use xlwt or OpenPyXL, but it seems xlwt doesn't support it and OpenPyXL only supports reading pivot tables: https://openpyxl.readthedocs.io/en/stable/pivot.html.

What would be the suggested way to do this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source