I am a big fan of syntax . broadcast ing in this type of situation.
those. df = readtable.(filter(r"^trip_data", readdir())) will give you an array of data frames (@avysk correctly, that you probably want filter not filter!
If you need one frame of data, then the mapreduce option is good.
Or you can: vcat(readtable.(filter(r"^trip_data", readdir()))
NB: all these are general solutions to the problem, I have a function (method) that applies f to x , and now I want to apply it to many instances or an array from x
So, if you get another error indicating that you cannot apply the function directly to any array or collection, but you can use one element, then map , broadcast / . and a list of concepts are your friends
source share