airbornegeo.resample#
- resample(data, *, spacing, resample_by, maxdist, groupby_column=None, progressbar=True)[source]#
Resample all numeric columns in a dataframe at a supplied spacing of the supplied resample_by column. For example, if resample_by is time in seconds, and spacing is 0.5, this will return a new dataframe with all numeric columns resampled at a resolution of 0.5 seconds.
- Parameters:
data (
DataFrame) â DataFrame containing the data to be reduced.spacing (
float) â The new resolution to resample the data ontoresample_by (
str) â Column name to use for the resampling, for example time or distance.maxdist (
float|None) â Only return resampled points which are within this distance of the nearest data point provided in resample_by, by default None,groupby_column (
str|None) â Column name to group by before resampling, by default None.progressbar (
bool) â Show progress bar for each group, by default True
- Returns:
DataFrame with reduced data.
- Return type: