datamuxer.DataMuxer.bin_on

DataMuxer.bin_on(source_name, interpolation=None, agg=None, use_cols=None)[source]

Return data resampled to align with the data from a particular source.

Parameters:
  • source_name (string) –
  • interpolation (dict, optional) –

    Override the default interpolation (upsampling) behavior of any data source by passing a dictionary of source names mapped onto one of the following interpolation methods.

    {None, ‘linear’, ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic’,
    ‘cubic’}

    None means that each time bin must have at least one value. See scipy.interpolator for more on the other methods.

  • agg (dict, optional) – Override the default reduction (downsampling) behavior of any data source by passing a dictionary of source names mapped onto any callable that reduces multiple data points (of whatever dimension) to a single data point.
  • use_cols (list, optional) – List of columns to include in binning; use all columns by default.
Returns:

resampled_df

Return type:

pandas.DataFrame

References

http://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html