utils.py
def plotly_histogram_perform(data, target, title):
    """
    Function used to convert performance label to html-ready plotly histogram.
    """
    colors = px.colors.qualitative.Plotly
    primary_key = remove_list_dup([item[0] for item in data.keys()])
    names = remove_list_dup([item[1] for item in data.keys()])
    target_data = []
    for value in data.values():
        target_data.append(value[target])
    target_data = np.array(target_data).reshape(2, int(len(target_data)/2)).T

    bars = [go.Bar(name=name, x=primary_key, y=y, legendgroup=str(i), showlegend=False, marker_color = colors[i]) for i, (name,y) in enumerate(zip(names, target_data))]

    return bars

    Function used to convert performance label to html-ready plotly histogram.
    
Function used to convert performance label to html-ready plotly histogram.
Function used to convert performance label to html - ready plotly histogram .
def plotly_histogram_perform(data, target, title):
    colors = px.colors.qualitative.Plotly
    primary_key = remove_list_dup([item[0] for item in data.keys()])
    names = remove_list_dup([item[1] for item in data.keys()])
    target_data = []
    for value in data.values():
        target_data.append(value[target])
    target_data = np.array(target_data).reshape(2, int(len(target_data)/2)).T
    bars = [go.Bar(name=name, x=primary_key, y=y, legendgroup=str(i), showlegend=False, marker_color = colors[i]) for i, (name,y) in enumerate(zip(names, target_data))]
    return bars
def plotly_histogram_perform ( data , target , title ) : colors = px . colors . qualitative . Plotly primary_key = remove_list_dup ( [ item [ 0 ] for item in data . keys ( ) ] ) names = remove_list_dup ( [ item [ 1 ] for item in data . keys ( ) ] ) target_data = [ ] for value in data . values ( ) : target_data . append ( value [ target ] ) target_data = np . array ( target_data ) . reshape ( 2 , int ( len ( target_data ) / 2 ) ) . T bars = [ go . Bar ( name = name , x = primary_key , y = y , legendgroup = str ( i ) , showlegend = False , marker_color = colors [ i ] ) for i , ( name , y ) in enumerate ( zip ( names , target_data ) ) ] return bars
Function used to convert performance label to html-ready plotly histogram.
Function used to convert performance label to html - ready plotly histogram .
"""
    Function used to convert performance label to html-ready plotly histogram.
    """
data
target
title