import pandas as pd import datetime from myapp.models import BlogPost df = pd.DataFrame(list(BlogPost.objects.all().values())) df = pd.DataFrame(list(BlogPost.objects.filter(date__gte=datetime.datetime(2012, 5, 1)).values()))
Above was how I do the same. The most useful addition is to indicate which fields you are interested in. If this is just a subset of the available fields that interest you, then this will give a performance boost, I think.
lexual Apr 29 '13 at 5:39 on 2013-04-29 05:39
source share