Hi, Thanks for the work on this package!
I was wondering if there's a way to get filenames as a column in disk.frame. I have multiple csv files which need to be pre-filtered before importing. I'm using inmapfn option in the csv_to_disk.frame() for this. Is there also any way I can get the filename as a column in diskframe (possibly within inmapfn)? I have looked at other issues and documentation but could not find this. I can't share the data unfortunately so I have copied my function code below. Thanks!
css_rbind_df <- function(files, outdir) {
css_india_raw_df <- csv_to_disk.frame(files,
outdir = outdir,
colClasses = list(character = c("GID_1", "NAME_1", "region_agg")),
inmapfn = function(chunk) {
chunk[country_agg == "USA"]
}
)
return(css_india_raw_df)
}
Hi, Thanks for the work on this package!
I was wondering if there's a way to get filenames as a column in disk.frame. I have multiple csv files which need to be pre-filtered before importing. I'm using inmapfn option in the csv_to_disk.frame() for this. Is there also any way I can get the filename as a column in diskframe (possibly within inmapfn)? I have looked at other issues and documentation but could not find this. I can't share the data unfortunately so I have copied my function code below. Thanks!