Releases · wq/django-rest-pandas
DRP 1.1.0Django REST Pandas 1.1.0 includes a new filename option (#31), confirmed support for Django 2, and a couple of minor fixes.
New FunctionalityAdded a get_pandas_filename()
view method, for cases where you have users downloading files through the API (#31). For example:
class TimeSeriesView(PandasView): # If a filename is returned, rest_pandas will include the following header: # 'Content-Disposition: attachment; filename="Data Export.xlsx"' def get_pandas_filename(self, request, format): if format in ('xls', 'xlsx'): # Use custom filename and Content-Disposition header return "Data Export" # Extension will be appended automatically else: # Default filename from URL (no Content-Disposition header) return NoneBug Fixes
renderer_context
is missing (#34)PandasBoxplotSerializer
: handle non-numeric columns and duplicate rows (abeb576)rest_pandas
with an existing view (#32, #36)Django REST Pandas 1.0.0 brings a number of API improvements that make it easier to integrate with existing DRF projects.
New FunctionalityREST_FRAMEWORK["DEFAULT_RENDERER_CLASSES"]
(#28)orient
parameter now defaults to a DRP-specific "records-index"
, which is like "records"
but calls reset_index()
before rendering."id"
is not a serializer field (#13)PandasScatterSerializer
(2636cc4)DateTimeField
serialization tips (#27)django-pandas
integration (#11)Django REST Pandas 0.5.0 introduces a simple PandasHTMLRenderer
for use in a browseable visualization API (#2). To enable it by default, you just need to add rest_pandas
to your INSTALLED_APPS
. You will need a template called rest_pandas.html
, or you can install django-mustache to use the provided mustache template (which is optimized for integration with a wq-powered application).
This release also includes updates for pandas 0.19 and drops support for Django REST Framework 2.4 (#23).
DRP 0.4.1Django REST Pandas 0.4.1 brings a few minor bug fixes:
This release is just to verify compatiblity with Django 1.8 and pandas 0.16.0. Older versions should still work, though note that Django 1.6 is no longer being tested against.
The only actual code change is 5faa4ec, which switches the JSON renderer from a default of orient="index"
to orient="records"
to get around a breaking test because it's a more reasonable default. You can restore the old behavior by subclassing PandasJSONRenderer
and overriding get_pandas_kwargs()
, but:
JSONRenderer
anyway.This release of DRP adds a small patch (1a81adc) to ensure that no pagination class will be used for DRP views when running in Django REST Framework 3.
DRP 0.3.0Django REST pandas 0.3.0 adds support for Django REST Framework 3 (#10) and a better separation between model serialization and DataFrame
creation - the latter now happening in a separate serializer (#8).
The new code is mostly backwards compatible (the tests haven't changed) but there are a couple of implementation changes that may affect you if you've customized or extended DRP.
PandasBaseSerializer
has been renamed to PandasSerializer
and replaces the former PandasSerializer
. When using DRP with DRF 3, the new PandasSerializer
is a ListSerializer and can only be used as such.PandasSimpleSerializer
has been renamed to SimpleSerializer
and no longer has any pandas-related functionality (since that's now handled in a separate step).PandasMixin
class encapsulates the functionality needed to add Pandas capabilities to a serialized result. This is accomplished via the new with_pandas_serializer(cls)
method that customizes any existing serializer_class
to enable Pandas capabilities as needed. The Pandas serializer can be overridden by specifying pandas_serializer_class
.You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4