Skip to content

pd.concat

pandas.concat(objs, axis=0, join="outer", join_axes=None, ignore_index=False, keys=None, levels=None, names=None, verify_integrity=False, sort=None, copy=True)

支持的参数

参数 数据类型 其他要求
objs DataFrames/Series的列表或元组
axis 取值为0或1的整数
  • 编译时必须为常量
ignore_index 布尔值
  • 在编译时必须是常量

重要

Bodo目前将本地数据块连接用于分布式数据集,这不保留输出中连接对象的全局顺序。

示例用法

>>> @bodo.jit
... def f(df1, df2):
...     return pd.concat([df1, df2], axis=1)

>>> df1 = pd.DataFrame({"A": [3, 2, 1, -4, 7]})
>>> df2 = pd.DataFrame({"B": [3, 25, 1, -4, -24]})
>>> f(df1, df2)

A   B
0  3   3
1  2  25
2  1   1
3 -4  -4
4  7 -24