cdm_reader_mapper.DataBundle.stack_h#
- DataBundle.stack_h(other, datasets=['data', 'mask'], inplace=False, **kwargs)[source]#
Stack multiple
DataBundle’s horizontally.- Parameters:
other (
str,list) – List of otherDataBundleto stack horizontally.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
DataBundlemay have different data columns!
Examples
>>> db = db1.stack_h(db2, datasets=["data", "mask"])
- Return type:
- Returns:
DataBundleorNone– Horizontally stacked DataBundle or None ifinplace=True.
See also
DataBundle.stack_vStack multiple DataBundle’s vertically.