typespecs.frame module#
- typespecs.frame.coalesce(frame: DataFrame, /) DataFrame[source]#
Coalesce multiple rows of a DataFrame into a single row.
- Parameters:
frame – DataFrame to coalesce.
- Returns:
Coalesced DataFrame (single row).
- typespecs.frame.concat(frames: Iterable[DataFrame], /) DataFrame[source]#
Concatenate DataFrames row-wise with missing values filled with
<NA>.- Parameters:
frames – DataFrames to concatenate.
- Returns:
Concatenated DataFrame.
- typespecs.frame.fillna(frame: DataFrame, value: Mapping[str, Any] | Any, /) DataFrame[source]#
Fill missing values (
<NA>only) in given DataFrame with given value.- Parameters:
frame – DataFrame to fill.
value – Default value for each column. Either a single value or a mapping of column names to values is accepted. If the specified columns are not present in
frame, each column filled with the specified value will be added.
- Returns:
DataFrame with missing values (
<NA>only) filled.