datopy.inspection.make_df#

make_df(
cols: Iterable[Any],
ind: Iterable[Any],
) DataFrame[source]#

Generate a data frame with a simple structure for conducting tests.

Parameters:
  • cols (Iterable[Any]) – An iterable with items representing column names.

  • ind (Iterable[Any]) – An iterable with items representing row names.

Returns:

A pandas data frame of shape (len(ind), len(cols)).

Return type:

pd.DataFrame

Examples

>>> from datopy.inspection import make_df
>>> import pandas as pd
>>> make_df("ABC", [1,2,3])
    A   B   C
1  A1  B1  C1
2  A2  B2  C2
3  A3  B3  C3
>>> make_df([1,2,3], ("A", "B", "C"))
    1   2   3
A  1A  2A  3A
B  1B  2B  3B
C  1C  2C  3C