From 02a8f6109088c806fc616f6ced80f8afde26ba99 Mon Sep 17 00:00:00 2001 From: Peter Luenenschloss <peter.luenenschloss@ufz.de> Date: Mon, 9 Dec 2019 15:54:30 +0100 Subject: [PATCH] small bugfix --- saqc/funcs/harm_functions.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/saqc/funcs/harm_functions.py b/saqc/funcs/harm_functions.py index 704d07b39..e084161a4 100644 --- a/saqc/funcs/harm_functions.py +++ b/saqc/funcs/harm_functions.py @@ -457,7 +457,7 @@ def _interpolate(data, method, order=2, inter_limit=2, downcast_interpolation=Fa data.interpolate(method=method, inplace=True, limit=1, limit_area="inside") else: - + dat_name = data.name gap_mask = (~gap_mask).cumsum() data = pd.merge(gap_mask, data, how="inner", left_index=True, right_index=True) @@ -482,7 +482,9 @@ def _interpolate(data, method, order=2, inter_limit=2, downcast_interpolation=Fa return x data = data.groupby(data.columns[0]).transform(_interpolWrapper) - + # squeezing the 1-dimensional frame resulting from groupby for consistency reasons + data = data.squeeze(axis=1) + data.name = dat_name return data @@ -832,4 +834,6 @@ def interpolate2Grid(data, field, flagger, freq, interpolation_method, interpola reshape_method=flag_assignment_method, reshape_agg=flag_agg_func, drop_flags=drop_flags, - **kwargs) \ No newline at end of file + **kwargs) + +#def aggregate(data, field, flagger, freq_base, freq_target, agg_func, **kwargs): \ No newline at end of file -- GitLab