flasc.data_processing.time_operations.df_resample_by_interpolation

flasc.data_processing.time_operations.df_resample_by_interpolation#

flasc.data_processing.time_operations.df_resample_by_interpolation(df, time_array, circular_cols, interp_method='linear', max_gap=None, verbose=True)[source]#

Resample a dataframe by interpolation onto a new time array.

Parameters:
  • df (pd.DataFrame | FlascDataFrame) -- Input dataframe.

  • time_array (np.array) -- New time array.

  • circular_cols (list) -- List of columns that are circular.

  • interp_method (str) -- Interpolation method. Default is "linear".

  • max_gap (float) -- Maximum gap for interpolation. Default is None. If None, will be set to 1.5 times the median timestep.

  • verbose (bool) -- Print information. Default is True.

Returns:

Resampled dataframe

Return type:

pd.DataFrame | FlascDataFrame