pack_seq

Contents

pack_seq#

pack_seq(sequence: Sequence, name: str | None = None, *, index: object = None, dtype: NestedDtype | ArrowDtype | DataType | None = None) NestedSeries[source]#

Pack a sequence of “flat” dataframes into a “nested” series.

Parameters:
  • sequence (Sequence of pd.DataFrame or None or pd.NA or convertible to pa.StructScalar) – Input sequence of dataframes or missed values.

  • name (str, optional) – Name of the output series.

  • index (pd.Index, optional) – Index of the output series.

  • dtype (dtype or None) – NestedDtype of the output series, or other type to derive from. If None, the dtype is inferred from the first non-missing dataframe.

Returns:

Output series.

Return type:

NestedSeries