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) – IfTrueoverwrite datasets inDataBundleelse return a copy ofDataBundlewith stacked datasets. Default: False
- Return type:
Note
This is only working with pd.DataFrames, not with iterables of pd.DataFrames!
The DataFrames in the
DataBundlehave to have the same data columns!
- Return type:
- Returns:
DataBundleorNone– Vertically stacked DataBundle or None ifinplace=True.
Examples
>>> db = db1.stack_v(db2, datasets=["data", "mask"])
See also
DataBundle.stack_hStack multiple DataBundle’s horizontally.