typeddfs.untyped_dfs

Defines DataFrames with convenience methods but that do not enforce invariants.

Module Contents

class typeddfs.untyped_dfs.UntypedDf(data=None, index=None, columns=None, dtype=None, copy=False)

A concrete DataFrame that does not require columns or enforce conditions. Overrides a number of DataFrame methods that preserve the subclass. For example, calling df.reset_index() will return a UntypedDf of the same type as df.

classmethod get_typing(cls) typeddfs.df_typing.DfTyping
classmethod new_df(cls, rows: int = 0, cols: Union[int, Sequence[str]] = 0, fill: Any = 0) __qualname__

Creates a new, semi-arbitrary DataFrame of the specified rows and columns. The DataFrame will have no index.

Parameters
  • rows – Number of rows

  • cols – Number of columns or a sequence of column labels

  • fill – Fill every cell with this value