Include django rest pandas dataframe Index field in json response
One simple way would be to just reset the index in transform_dataframe method.
df = df.reset_index()
This would just add a new index and set your old index as a column, included in the output.
Backgroud
I am using django-rest-pandas for serving json & xls. 
Observation
When I hit url with format=xls, I get complete data in the downloaded file. But for format=josn, the index field of dataframe is not part of the records. 
Question
How can I make django-rest-pandas to include dataframe's index field in json response? 
Note that the index field is present as part of serializer (extending serializer.ModelSerializer).