TPDeramus commented on issue #39038:
URL: https://github.com/apache/arrow/issues/39038#issuecomment-1836971381
Further, the use of `concat_tables()`
library(arrow)
library(tidyverse)
library(fastDummies)
temp <- open_csv_dataset(sources = cohort_csvs) %>% compute()
Subs <- data.frame(temp %>% distinct(key) %>% collect())
for (Subnum in 1:dim(Subs)[1]) {
out <-
data.frame(temp %>% filter(key == Subs[Subnum, ]) %>% collect())
out[is.na(out)] <- 'NA'
out$tags <- 'NA'
out <-
dummy_cols(
out,
select_columns = "terms",
remove_selected_columns = FALSE,
omit_colname_prefix = TRUE
)
out <-
dummy_cols(
out,
select_columns = "tags",
remove_selected_columns = FALSE,
omit_colname_prefix = TRUE
)
if (Subnum == 1){
Out_table <- arrow_table(out)
} else {
Out_table <- concat_tables(Out_table, arrow_table(out))
}
Seems to proceed without any errors.
Though I am uncertain this will provide what I need in the long run if there
are still `NA` values in the table (which should be swapped to 0 without
pulling into memory if possible).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]