Dummy Records

Dummy records, ready to use

Hint

can be directly called from core as core.dummy

usage:

from ozcore import core

core.dummy.emp
#...returns a dataframe with 10 records

core.dummy.dataframe(n=3, template="emp", verbose=True)
#...returns a dataframe with 3 records using **emp** template

core.dummy.df1
#...returns a dataframe with faked with seed 99 having shape(5,5)

core.dummy.df2
#...returns another dataframe with faked with seed 99 having shape(5,5)

core.dummy.df1
#...returns another dataframe with faked with seed 99 having shape(5,4)

core.dummy.fake.name_female()
# ... you also have access to Faker class

Todo

New templates other than emp, e.g. np arrays shall be included

class ozcore.core.data.dummy.Dummy[source]

ready-to-use dummy records, created using Faker

property emp

ready to use dummy employee dataframe with 10 records

Returns

dataframe with 10 records

dataframe(template='emp', n=10, verbose=True)[source]

create a dummy dataframe

Parameters
  • n – int, number of records, default 10

  • template – str, default “emp”, choose from ready templates

  • verbose – bool, default True

Returns

  • if verbose, returns the dataframe

  • else, assigns class df values

Warning

Cannot assign 1 record only, if n<2 then n=2

_json_employee(n=10)[source]

dummy json object with keys for employee template

Parameters

n – int, number of records, default 10

Returns

json object

property df1

Dataframe with Faker’s seed 99

Returns

Dataframe shape(5,5), 5th col as datetime object

property df2

Dataframe with Faker’s seed 99

Returns

Dataframe shape(5,5), 5th col as dict object

property df3

Dataframe with Faker’s seed 99

Returns

Dataframe shape(5,4)

_make_df_w_seed_99(df_no=1)[source]

creates a dummy Dataframe with Faker seed 99

Parameters

df_no – int, default 1, can be 1 , 2 or 3

Returns

  • a dataframe

  • all three dataframes have their first 2 columns identical

  • df_no=1: (5,5), 5th col as datetime object

  • df_no=2: (5,5), 5th col as dict object

  • df_no=3: (5,4)