diff --git a/saqc/funcs/harm_functions.py b/saqc/funcs/harm_functions.py index 704d07b3997ea0ef5eae941a1d08852562046062..e084161a458c720f3f7893d3b0423d4c1c20efec 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