piper.factory.sample_sales

piper.factory.sample_sales(number_of_rows: int = 200, year: int = 2021, seed: int = 42)pandas.core.frame.DataFrame[source]

Generate sales product data

location, product, month, target_sales, target_profit, actual_sales, actual profit.

Examples

get_sample_sales().head()

| location| product   | month     |target_sales |target_profit |actual_sales |actual_profit |
| London  | Beachwear | 2021-01-01|       31749 |      1904.94 |     29209.1 |      1752.54 |
| London  | Beachwear | 2021-01-01|       37833 |      6053.28 |     34049.7 |      5447.95 |
| London  | Jeans     | 2021-01-01|       29485 |      4127.9  |     31549   |      4416.85 |
| London  | Jeans     | 2021-01-01|       37524 |      3752.4  |     40901.2 |      4090.12 |
| London  | Sportswear| 2021-01-01|       27216 |      4354.56 |     29121.1 |      4659.38 |
Parameters
  • number_of_rows – number of records/rows required.

  • year – sales year to generate data for.

  • seed – random seed, default 42

Returns

Return type

Pandas Dataframe