make fake data quick
Project description
DataBuilder
Installation
pip install databuilder
Basic Usage
import databuilder as db
# make a dummy dataset about "our employees"
config = {
'fields': {
'empID': db.ID(),
'first_name': db.Name(first_only=True),
'last_name': db.Name(last_only=True),
'department': db.Group(["Sales", "Acct", "Mktg", "IT"]),
'salary': db.NormalDist(50000, 10000),
'hire_date': db.Date("1990-01-01", "2020-12-31")
}
}
# create a Pandas DataFrame object with
# 200 rows and the fields defined in `config`
df = db.create_df(config, n=200)
print(df.head(2))
# Example output:
# empID first_name last_name department salary hire_date
# 0 1 Frank Ward IT 69210 2004-05-05
# 1 2 Barbara George Mktg 46744 2019-05-20
MORE COMING SOON
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
databuilder-0.0.1.tar.gz
(6.4 kB
view hashes)
Built Distribution
Close
Hashes for databuilder-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37275132e2b38d13e88b3717f3e47d90e374d46592e51166a4e062a2721c5555 |
|
MD5 | 5afb6dc1d90a9d00ae5c3cf1ab819ec3 |
|
BLAKE2b-256 | d1d67bda049137d204b557986c327e0544cc9f1509c5e0a5e7d21e9208cd2d85 |