No project description provided
Project description
Random Data Generator
This is a test package to generate random transactional data.
With this package you can create a table with transactional data containing:
- consumer_id: ID identifing the customer that does the transaction;
- created_at: Date of transaction;
- payment_value: Monetary value of transaction.
All this fields are customizable.
How to use
You can start the use o RandomDataGen with this example code:
from random_data_gen.data_generator import DataGenerator
TRGenerator = DataGenerator(
n_rows=1000,
n_ids=100,
mean_spend=100,
std_spend=10,
start_date="2020-01-01",
end_date="2021-01-01",
)
df = TRGenerator()
In this snippet we defined a table with 1000 rows, 100 unique users, a mean spend in transactions of 100 u.m. a standard deviation in transactional spend of 10u.m., the start date (2020-01-01) and the end date (2021-01-01).
The df returned is in the form:
| consumer_id | created_at | payment_value |
|-------------|-------------------------------|---------------|
| 234 | 2020-02-03 02:15:12.051981122 | 120.10 |
| 43 | 2020-05-11 08:47:34.054054054 | 87.10 |
| 3123 | 2020-12-30 21:37:17.837837840 | 12.84 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
random-data-gen-0.1.1.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for random_data_gen-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d5b962c6986e057ebd2e03ad0315ed216fa44aaa18c1f976860188776ac1c49 |
|
MD5 | fde62a6748addf3f7a737a01188762f3 |
|
BLAKE2b-256 | 5072d8ef917e1c5b1b940104023ed18b255455a83f8321a6b89b667e63c301d4 |