Movatterモバイル変換


[0]ホーム

URL:


Skip to contents

Concatenate one or more Tables

Source:R/table.R
concat_tables.Rd

Concatenate one or moreTable objects into a single table. This operationdoes not copy array data, but instead creates new chunked arrays for eachcolumn that point at existing array data.

Usage

concat_tables(..., unify_schemas=TRUE)

Arguments

...

One or moreTable orRecordBatch objects. RecordBatch objectswill be automatically converted to Tables.

unify_schemas

If TRUE, the schemas of the tables will be first unifiedwith fields of the same name being merged, then each table will be promotedto the unified schema before being concatenated. Otherwise, all tables shouldhave the same schema.

Examples

tbl<-arrow_table(name=rownames(mtcars),mtcars)prius<-arrow_table(name="Prius", mpg=58, cyl=4, disp=1.8)combined<-concat_tables(tbl,prius)tail(combined)$to_data_frame()#># A tibble: 6 x 12#>   name           mpg   cyl  disp    hp  drat    wt  qsec    vs    am  gear  carb#><chr><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl><dbl>#>1 Lotus Europa  30.4     4  95.1   113  3.77  1.51  16.9     1     1     5     2#>2 Ford Panter~  15.8     8 351     264  4.22  3.17  14.5     0     1     5     4#>3 Ferrari Dino  19.7     6 145     175  3.62  2.77  15.5     0     1     5     6#>4 Maserati Bo~  15       8 301     335  3.54  3.57  14.6     0     1     5     8#>5 Volvo 142E    21.4     4 121     109  4.11  2.78  18.6     1     1     4     2#>6 Prius         58       4   1.8NANANANANANANANA# Can also pass RecordBatch objectsbatch<-record_batch(name="Volt", mpg=53, cyl=4, disp=1.5)combined2<-concat_tables(tbl,batch)

[8]ページ先頭

©2009-2026 Movatter.jp