Pivot functionality?
I don't think this is a good fit for a library like Peewee, but I would encourage you, if you think it would be useful, to create your own module.
I think a really good feature in Peewee would be pivoting data which is supported up to some extent by different database vendors. Having pivot support would be a welcome abstraction to Peewee for a far common problem. Note that pandas implements pivoting see: https://pandas.pydata.org/Pandas_Cheat_Sheet.pdf

Pivoting means to turn data stored in long (or narrow) format, into wide format i.e. closer to a dataframe. Why saving the data in long format in the first place? because it's more extensible requiring less potential schema updates to extend.

See a relevant SO question here:
[How to pivot in SQLite or i.e. select in wide format a table stored in long format?](https://stackoverflow.com/questions/1237068/how-to-pivot-in-sqlite-or-i-e-select-in-wide-format-a-table-stored-in-long-form)