We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PandasBaseRenderer().render(data)
TypeError
For personal reasons, I wanted to call the PandasCSVRenderer on a dataframe outside of a view.
PandasCSVRenderer
Because renderer_context is defaulted to None, the following code will throw TypeError: argument of type 'NoneType' is not iterable:
renderer_context
None
TypeError: argument of type 'NoneType' is not iterable
from rest_pandas import renderers data_frame = pandas.DataFrame(some_data) print renderers.PandasCSVRenderer().render(data_frame) >>>TypeError: argument of type 'NoneType' is not iterable
I suggest two options to fix the following code:
django-rest-pandas/rest_pandas/renderers.py
Line 30 in edd3225
if renderer_context and 'response' in renderer_context:
if renderer_context is None: renreder_context = {} ...
The text was updated successfully, but these errors were encountered:
3a20c35
Thanks for the suggestion. This is fixed in v1.1.0
Sorry, something went wrong.
Thanks for closing the issue!
No branches or pull requests
For personal reasons, I wanted to call the
PandasCSVRenderer
on a dataframe outside of a view.Because
renderer_context
is defaulted toNone
, the following code will throwTypeError: argument of type 'NoneType' is not iterable
:I suggest two options to fix the following code:
django-rest-pandas/rest_pandas/renderers.py
Line 30 in edd3225
The text was updated successfully, but these errors were encountered: