How to convert Django QuerySet to Pandas Dataframe

Steps for conversion--

pip install pandas
pip install django-pandas

Assume model structre like that - 

class MyModel(models.Model):

    title = models.CharField(max_length=250)
    view_count = models.IntegerField()
    status = models.CharField(max_length=3)

Now Create a Django Query set like below-

from import read_frame
query = MyModel.objects.all()

Now Create a Pandas DataFrame

df = read_frame(qs)


Total Views: 1620