forked from finos/datahub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
27 lines (23 loc) · 819 Bytes
/
Copy pathrun.py
File metadata and controls
27 lines (23 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import numpy as np
import datahub_core.generators as gen
import datahub_core.data as data
def run():
df = gen.generate(
props={
'region': gen.choice(
data=['EMEA', 'LATAM', 'NAM', 'APAC'],
weights=[0.1, 0.1, 0.3, 0.5]),
'firmAccount': gen.normal_sampler(
data=['fa1', 'fa2', 'fa3', 'fa4', 'fa5', 'fa6']),
"country": gen.country_codes(region_field='region'),
"client_type": gen.choice(data=data.client_types()),
"client_name": gen.company_namer(
field='client_type',
field_type='client_type',
countrycode_field='country'
)},
count=50,
randomstate=np.random.RandomState(13031981)
).to_dataframe()
print(df)
run()