niimpy.exploration.setup_dataframe module

niimpy.exploration.setup_dataframe.create_categorical_dataframe()[source]

Create a sample Pandas dataframe used by the test functions.

Returns
dfpandas.DataFrame

Pandas dataframe containing sample data.

niimpy.exploration.setup_dataframe.create_dataframe()[source]

Create a sample Pandas dataframe used by the test functions.

Returns
dfpandas.DataFrame

Pandas dataframe containing sample data.

niimpy.exploration.setup_dataframe.create_missing_dataframe(nrows, ncols, density=0.9, random_state=None, index_type=None, freq=None)[source]

Create a Pandas dataframe with random missingness.

Parameters
nrowsint

Number of rows

ncolsint

Number of columns

density: float

Amount of available data

random_state: float, optional

Random seed. If not given, default to 33.

index_type: float, optional

Accepts the following values: “dt” for timestamp, “int” for integer.

freq: string, optional:

Sampling frequency. This option is only available is index_type is “dt”.

Returns
dfpandas.DataFrame

Pandas dataframe containing sample data with random missing rows.

niimpy.exploration.setup_dataframe.create_timeindex_dataframe(nrows, ncols, random_state=None, freq=None)[source]

Create a datetime index Pandas dataframe

Parameters
nrowsint

Number of rows

ncolsint

Number of columns

random_state: float, optional

Random seed. If not given, default to 33.

freq: string, optional:

Sampling frequency.

Returns
——-
dfpandas.DataFrame

Pandas dataframe containing sample data with random missing rows.