datatable.cbind()

Create a new Frame by appending columns from several frames.

This function is exactly equivalent to:

dt.Frame().cbind(*frames, force=force)

Parameters

frames
Frame | List[Frame] | None
force
bool
return
Frame

See also

  • rbind() – function for row-binding several frames.

  • dt.Frame.cbind() – Frame method for cbinding some frames to another.

Examples

from datatable import dt, f DT = dt.Frame(A=[1, 2, 3], B=[4, 7, 0]) DT
AB
int32int32
014
127
230
frame1 = dt.Frame(N=[-1, -2, -5]) frame1
N
int32
0-1
1-2
2-5
dt.cbind([DT, frame1])
ABN
int32int32int32
014-1
127-2
230-5

If the number of rows are not equal, you can force the binding by setting the force parameter to True:

frame2 = dt.Frame(N=[-1, -2, -5, -20]) frame2
N
int32
0-1
1-2
2-5
3-20
dt.cbind([DT, frame2], force=True)
ABN
int32int32int32
014-1
127-2
230-5
3NANA-20