Пример #1
0
def distribute(entity_ids, data_schema, columns, histnorm="percent", nbinsx=20, filters=None):
    columns = ["entity_id", "timestamp"] + columns
    df = data_schema.query_data(entity_ids=entity_ids, columns=columns, filters=filters)
    if not entity_ids:
        df["entity_id"] = "entity_x_distribute"
    drawer = Drawer(main_df=df)
    drawer.draw_histogram(show=True, histnorm=histnorm, nbinsx=nbinsx)
Пример #2
0
def distribute(entity_ids, data_schema, columns, histnorm='percent', nbinsx=20, filters=None):
    columns = ['entity_id', 'timestamp'] + columns
    df = data_schema.query_data(entity_ids=entity_ids, columns=columns, filters=filters)
    if not entity_ids:
        df['entity_id'] = 'entity_x_distribute'
    drawer = Drawer(main_df=df)
    drawer.draw_histogram(show=True, histnorm=histnorm, nbinsx=nbinsx)
Пример #3
0
def distribute_df(df, histnorm="percent", nbinsx=20):
    """
    distribute indicators(columns) of entities in df

    :param df: normal df
    :param histnorm: "percent", "probability", default "percent"
    :param nbinsx:
    """
    drawer = Drawer(main_df=df)
    drawer.draw_histogram(show=True, histnorm=histnorm, nbinsx=nbinsx)