Matt-Texier opened a new issue #6552: pandas resampling using quantile misbehaving URL: https://github.com/apache/incubator-superset/issues/6552 Make sure these boxes are checked before submitting your issue - thank you! - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any. - [x] I have reproduced the issue with at least the latest released version of superset. - [x] I have checked the issue tracker for the same issue and I haven't found one similar. ### Superset version 0.28.0 ### Expected results Advanced analytics pandas resample : quantile function to calculate quantile according to quantile parameter passed as an argument to quantile function ### Actual results No result displayed ``` Dec 18 11:53:51 pass-front gunicorn[8338]: /home/superset/venv/superset/lib/python3.6/site-packages/superset/viz.py:1147: FutureWarning: how in .resample() is deprecated Dec 18 11:53:51 pass-front gunicorn[8338]: the new syntax is .resample(...).quantile(0.95)() Dec 18 11:53:51 pass-front gunicorn[8338]: df = df.resample(rule, how=how, fill_method=fm) Dec 18 11:53:51 pass-front gunicorn[8338]: 2018-12-18 11:53:51,371:ERROR:root:quantile(0.95) is an unknown string function Dec 18 11:53:51 pass-front gunicorn[8338]: Traceback (most recent call last): Dec 18 11:53:51 pass-front gunicorn[8338]: File "/home/superset/venv/superset/lib/python3.6/site-packages/superset/views/core.py", line 1149, in generate_json Dec 18 11:53:51 pass-front gunicorn[8338]: payload = viz_obj.get_payload() Dec 18 11:53:51 pass-front gunicorn[8338]: File "/home/superset/venv/superset/lib/python3.6/site-packages/superset/viz.py", line 371, in get_payload Dec 18 11:53:51 pass-front gunicorn[8338]: payload['data'] = self.get_data(df) Dec 18 11:53:51 pass-front gunicorn[8338]: File "/home/superset/venv/superset/lib/python3.6/site-packages/superset/viz.py", line 1212, in get_data Dec 18 11:53:51 pass-front gunicorn[8338]: df = self.process_data(df) Dec 18 11:53:51 pass-front gunicorn[8338]: File "/home/superset/venv/superset/lib/python3.6/site-packages/superset/viz.py", line 1147, in process_data Dec 18 11:53:51 pass-front gunicorn[8338]: df = df.resample(rule, how=how, fill_method=fm) Dec 18 11:53:51 pass-front gunicorn[8338]: File "/home/superset/venv/superset/lib/python3.6/site-packages/pandas/core/generic.py", line 7114, in resample Dec 18 11:53:51 pass-front gunicorn[8338]: limit=limit) Dec 18 11:53:51 pass-front gunicorn[8338]: File "/home/superset/venv/superset/lib/python3.6/site-packages/pandas/core/resample.py", line 810, in _maybe_process_deprecations Dec 18 11:53:51 pass-front gunicorn[8338]: r = r.aggregate(how) Dec 18 11:53:51 pass-front gunicorn[8338]: File "/home/superset/venv/superset/lib/python3.6/site-packages/pandas/core/resample.py", line 240, in aggregate Dec 18 11:53:51 pass-front gunicorn[8338]: result, how = self._aggregate(arg, *args, **kwargs) Dec 18 11:53:51 pass-front gunicorn[8338]: File "/home/superset/venv/superset/lib/python3.6/site-packages/pandas/core/base.py", line 348, in _aggregate Dec 18 11:53:51 pass-front gunicorn[8338]: **kwargs), None Dec 18 11:53:51 pass-front gunicorn[8338]: File "/home/superset/venv/superset/lib/python3.6/site-packages/pandas/core/base.py", line 317, in _try_aggregate_string_function Dec 18 11:53:51 pass-front gunicorn[8338]: raise ValueError("{arg} is an unknown string function".format(arg=arg)) Dec 18 11:53:51 pass-front gunicorn[8338]: ValueError: quantile(0.95) is an unknown string function ``` ### Steps to reproduce In the advanced analytics section of the charts, scroll down to pandas resample and use the following function in the how field: ```quantile(0.95)``` and ```60T``` to have a resampling in hours (my dataset is using 1 minute bin as default.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
