universal

data_base.analyze.spatiotemporal_binning.universal(df, distance_column, spatial_distance_bins=50, min_time=0, max_time=300, time_distance_bins=1)

Bin a pandas or dask DataFrame by both distance and time.

Infers the type of the input DataFrame and calls the appropriate binning function.

Parameters:
df : DataFrame

DataFrame to bin. Must contain a column with the name distance_column that contains the distance values.

distance_column : str

Column name of the distance values.

spatial_distance_bins : int

Size of the spatial bins. Default is \(50\mu m\).

min_time : int

Minimum time value. Default is \(0 ms\).

max_time : int

Maximum time value. Default is \(300ms\).

time_distance_bins : int

Size of the time bins. Default is \(1ms\).

Returns:

A 2D array of the binned values.

Return type:

array

See also

universal_pd()