bucketplot.py
def add_x_coords(df_agg, x_edges=None, x_point=None, x_label=None, **kwargs):
    """
    Given a DataFrame where each row is a bucket, add x-axis 
    properties to be used for plotting. See pipe_funcs_df for 
    available options.
    
    x_edges: How to position the x-axis edges.
        Default: 'interval'
    x_point: Where to position each bucket point on the x-axis.
        Default: 'mid'
    x_label: Option for x-axis label.
        Default: 'none'
    **kwargs: Additional arguments to pass to the functions.
    """
    # Set variables for use throughout the function
    calling_func = 'add_x_coords'
    kwarg_keys = list(kwargs.keys())
    
    # Set defaults
    if x_edges is None:
        x_edges = 'interval'
    if x_point is None:
        x_point = 'mid'
    if x_label is None:
        x_label = 'none'
    
    # Get pipeline functions
    x_edges_func = [
        functools.partial(full_func, **{arg_name: kwargs[arg_name] for arg_name in arg_names})
        for full_func, arg_names in [get_pipeline_func('x_edges', x_edges, kwarg_keys, calling_func)]
    ][0]
    x_point_func = [
        functools.partial(full_func, **{arg_name: kwargs[arg_name] for arg_name in arg_names})
        for full_func, arg_names in [get_pipeline_func('x_point', x_point, kwarg_keys, calling_func)]
    ][0]
    x_label_func = [
        functools.partial(full_func, **{arg_name: kwargs[arg_name] for arg_name in arg_names})
        for full_func, arg_names in [get_pipeline_func('x_label', x_label, kwarg_keys, calling_func)]
    ][0]
    
    # Apply the functions
    res = df_agg.pipe(
        lambda df: x_edges_func(df)
    ).pipe(
        lambda df: x_point_func(df)
    ).pipe(
        lambda df: x_label_func(df)
    )
    return(res)

    Given a DataFrame where each row is a bucket, add x-axis 
    properties to be used for plotting. See pipe_funcs_df for 
    available options.
    
    x_edges: How to position the x-axis edges.
        Default: 'interval'
    x_point: Where to position each bucket point on the x-axis.
        Default: 'mid'
    x_label: Option for x-axis label.
        Default: 'none'
    **kwargs: Additional arguments to pass to the functions.
    
Given a DataFrame where each row is a bucket, add x-axis
properties to be used for plotting. See pipe_funcs_df for
available options.


Given a DataFrame where each row is a bucket add x - axis properties to be used for plotting . See pipe_funcs_df for available options .
def add_x_coords(df_agg, x_edges=None, x_point=None, x_label=None, **kwargs):
    calling_func = 'add_x_coords'
    kwarg_keys = list(kwargs.keys())
    if x_edges is None:
        x_edges = 'interval'
    if x_point is None:
        x_point = 'mid'
    if x_label is None:
        x_label = 'none'
    x_edges_func = [
        functools.partial(full_func, **{arg_name: kwargs[arg_name] for arg_name in arg_names})
        for full_func, arg_names in [get_pipeline_func('x_edges', x_edges, kwarg_keys, calling_func)]
    ][0]
    x_point_func = [
        functools.partial(full_func, **{arg_name: kwargs[arg_name] for arg_name in arg_names})
        for full_func, arg_names in [get_pipeline_func('x_point', x_point, kwarg_keys, calling_func)]
    ][0]
    x_label_func = [
        functools.partial(full_func, **{arg_name: kwargs[arg_name] for arg_name in arg_names})
        for full_func, arg_names in [get_pipeline_func('x_label', x_label, kwarg_keys, calling_func)]
    ][0]
    res = df_agg.pipe(
        lambda df: x_edges_func(df)
    ).pipe(
        lambda df: x_point_func(df)
    ).pipe(
        lambda df: x_label_func(df)
    )
    return(res)
def add_x_coords ( df_agg , x_edges = None , x_point = None , x_label = None , ** kwargs ) : calling_func = 'add_x_coords' kwarg_keys = list ( kwargs . keys ( ) ) if x_edges is None : x_edges = 'interval' if x_point is None : x_point = 'mid' if x_label is None : x_label = 'none' x_edges_func = [ functools . partial ( full_func , ** { arg_name : kwargs [ arg_name ] for arg_name in arg_names } ) for full_func , arg_names in [ get_pipeline_func ( 'x_edges' , x_edges , kwarg_keys , calling_func ) ] ] [ 0 ] x_point_func = [ functools . partial ( full_func , ** { arg_name : kwargs [ arg_name ] for arg_name in arg_names } ) for full_func , arg_names in [ get_pipeline_func ( 'x_point' , x_point , kwarg_keys , calling_func ) ] ] [ 0 ] x_label_func = [ functools . partial ( full_func , ** { arg_name : kwargs [ arg_name ] for arg_name in arg_names } ) for full_func , arg_names in [ get_pipeline_func ( 'x_label' , x_label , kwarg_keys , calling_func ) ] ] [ 0 ] res = df_agg . pipe ( lambda df : x_edges_func ( df ) ) . pipe ( lambda df : x_point_func ( df ) ) . pipe ( lambda df : x_label_func ( df ) ) return ( res )
Given a DataFrame where each row is a bucket, add x-axis
properties to be used for plotting.
Given a DataFrame where each row is a bucket add x - axis properties to be used for plotting .
"""
    Given a DataFrame where each row is a bucket, add x-axis 
    properties to be used for plotting. See pipe_funcs_df for 
    available options.
    
    x_edges: How to position the x-axis edges.
        Default: 'interval'
    x_point: Where to position each bucket point on the x-axis.
        Default: 'mid'
    x_label: Option for x-axis label.
        Default: 'none'
    **kwargs: Additional arguments to pass to the functions.
    """ # Set variables for use throughout the function # Set defaults # Get pipeline functions # Apply the functions
df_agg
x_edges
x_point
x_label