Method: Rust::CSV.read_all

Defined in:
lib/rust/core/csv.rb

.read_all(pattern, **options) ⇒ Object

Reads a pattern of CSVs (glob-style pattern) and returns a map containing as keys the filenames of the loaded CSVs and as values the corresponding data-frames. Options can be specified (see #read).



15
16
17
18
19
20
21
# File 'lib/rust/core/csv.rb', line 15

def self.read_all(pattern, **options)
    result = DataFrameHash.new
    Dir.glob(pattern).each do |filename|
        result[filename] = CSV.read(filename, **options)
    end
    return result
end