cdm_reader_mapper.DataBundle.stack_v

cdm_reader_mapper.DataBundle.stack_v#

DataBundle.stack_v(other, datasets=['data', 'mask'], inplace=False, **kwargs)[source]#

Stack multiple DataBundle’s vertically.

Parameters:
  • other (str, list) – List of other DataBundles to stack vertically.

  • datasets (str, list) – List of datasets to be stacked. Default: [‘data’, ‘mask’]

  • inplace (bool) – If True overwrite datasets in DataBundle else return a copy of DataBundle with stacked datasets. Default: False

Return type:

cdm_reader_mapper.core.databundle.DataBundle | None

Note

  • This is only working with pd.DataFrames, not with iterables of pd.DataFrames!

  • The DataFrames in the DataBundle have to have the same data columns!

Return type:

DataBundle | None

Returns:

DataBundle or None – Vertically stacked DataBundle or None if inplace=True.

Examples

>>> db = db1.stack_v(db2, datasets=["data", "mask"])

See also

DataBundle.stack_h

Stack multiple DataBundle’s horizontally.