Hack: Peewee Tables to Pandas DataFrames
There is a mechanism to inspect fields, MyModelClass._meta.fields. Check it out -- should be what you need.
I find SQL tables excellent for experimental data collection (often multi-day processes) and godawful for examination/analysis.  So, I figured out this trick and figured I'd send it to you in case anyone else out there finds it useful.  Note: it would definitely be cleaner if there was a mechanism to introspect fields.

```python
import pandas as pd
import peewee

def peewee_to_df(table):
    fields = [fld for fld in dir(table) if isinstance(getattr(table, fld), peewee.Field)]
    data = list(table.select(*[getattr(table, fld) for fld in fields]).tuples())
    df = pd.DataFrame.from_records(data, columns=fields)
    if 'id' in fields:
        df.set_index('id', inplace=True)
    return df
```

