data_baseanalyzetemporal_binningtemporal_binning_dask

temporal_binning_dask

data_base.analyze.temporal_binning.temporal_binning_dask(ddf, bin_size=1, min_time=None, max_time=None, normalize=True, client=None)

Bin timevalues in a dask DataFrame.

Given a dataframe containing time values in columns whose name can be converted to an integer, this function bins the values. It assumes that all columns whose names are integer-convertible contain time values. This is true for Presynaptic spike times and Synapse activation dataframes.

Parameters:
  • 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_borders have 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.

  • client (dask.distributed.Client, optional) – Dask client to use for parallel computation.

Returns:

Tuple containing the bin borders and the binned data.

Return type:

tuple