DW.get_sales_dynamics (eng) - datawizio/pythonAPI GitHub Wiki

DW.get_sales_dynamics - returns data about dynamics of product sales

Parameters

  • sale_id: int, list

    id of sales or a list of ids

  • shops: int, list

    id of the shop or a list of ids that will be used for selection

  • date_from: datetime, str {%Y-%m-%d}

    starting date of selection

  • date_to: datetime, str {%Y-%m-%d}

    ending date of selection

  • If the interval [date_from, date_to] has not been set, last 30 client's days will be used for selection.

    If only one parameter has been set, then 30 client's days from selected parameter will be used for selection.

  • show: str, {"id", "name", "both", default="name"}

    Type of column names

  • by: str

              {'turnover': turnover,
               'receipts_qty': quantity of receipts, 
                default="turnover"}
    

    Characteristics that will be used for receiving selection results

    Returns

    Returns object 'DataFrame' in the format
    Sale1 Sale2 Sale3 ... SaleN
    date <by> <by> <by> <by>
    date <by> <by> <by> <by>
    date <by> <by> <by> <by>

    Examples

    dw = datawiz.DW()
                dw.get_sales_dynamics(
                                    date_from='2015-5-1',
                                    date_to='2015-11-1',
                                    by='receipts_qty', 
                                    show='both'
    				)
    

    Returns data about quantity of receipts for sales that were held in the period from 1-5-2015 till1-11-2015, identifier and name of sales are to be used as names of columns

    ⚠️ **GitHub.com Fallback** ⚠️