-
Notifications
You must be signed in to change notification settings - Fork 118
Open
Description
When trying to use read_frame with a RawQuerySet :
from django_pandas.io import read_frame
from apps.immodata.models import Observation
obj = MyModel.objects.raw("Select * from myapp_mymodel") # dummy RawQuerySet
read_frame(obj)
getting this error :
venv/lib/python3.5/site-packages/django_pandas/io.py in read_frame(qs, fieldnames, index_col, coerce_float, verbose)
74 fieldnames = tuple(fieldnames) + (index_col,)
75 fields = to_fields(qs, fieldnames)
---> 76 elif is_values_queryset(qs):
77 if django.VERSION < (1, 9):
78 if django.VERSION < (1, 8):
venv/lib/python3.5/site-packages/django_pandas/io.py in is_values_queryset(qs)
30 return isinstance(qs, django.db.models.query.ValuesQuerySet)
31 else:
---> 32 return qs._iterable_class == django.db.models.query.ValuesIterable
33
34
AttributeError: 'RawQuerySet' object has no attribute '_iterable_class'
Is there a workaround?
Metadata
Metadata
Assignees
Labels
No labels