villebro commented on a change in pull request #16607:
URL: https://github.com/apache/superset/pull/16607#discussion_r710757196



##########
File path: superset/utils/pandas_postprocessing.py
##########
@@ -916,3 +916,29 @@ def outliers(series: Series) -> Set[float]:
         for metric in metrics
     }
     return aggregate(df, groupby=groupby, aggregates=aggregates)
+
+
+def resample(
+    df: DataFrame,
+    resample_rule: str,
+    resample_method: str,
+    time_column: str,
+    resample_fill_zero: bool = False,
+) -> DataFrame:

Review comment:
       As these are all resample options, could we just remove the `resample_` 
prefix, resulting in `rule`, `method` etc?

##########
File path: superset/utils/pandas_postprocessing.py
##########
@@ -916,3 +916,29 @@ def outliers(series: Series) -> Set[float]:
         for metric in metrics
     }
     return aggregate(df, groupby=groupby, aggregates=aggregates)
+
+
+def resample(
+    df: DataFrame,
+    resample_rule: str,
+    resample_method: str,
+    time_column: str,
+    resample_fill_zero: bool = False,

Review comment:
       To futureproof this, would it make sense to have a `fill_value: 
Optional[Union[float, int]]` here?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to