data_base ❭ analyze ❭ temporal_binning ❭ universal
universal¶
- data_base.analyze.temporal_binning.universal(*args, **kwargs)¶
Bin spike times for dask or pandas dataframes.
Infers the dataframe type and calls the appropriate binning function.
- Parameters:¶
df | ddf (
dask.dataframe.DataFrame) – DataFrame with containing time values in columns whose name are integer-convertible.bin_size (float, optional) – Size of the bins. If not specified,
bin_bordershave to be specified.min_time (float, optional) – Minimum time to consider. If not specified, the minimum value in the DataFrame is used.
max_time (float, optional) – Maximum time to consider. If not specified, the maximum value in the DataFrame is used.
normalize (bool, optional) – If True, normalize the output to the total number of elements in the DataFrame.
rate (bool, optional) – If True, normalize the output to the bin size. Only valid if
dfis a pandas DataFrame.client (
dask.distributed.Client, optional) – Dask client to use for parallel computation. Only valid ifddfis a dask DataFrame.
See also