diff --git a/lib/daru/io/io.rb b/lib/daru/io/io.rb index 1555c5d79..d1ed5fcd1 100644 --- a/lib/daru/io/io.rb +++ b/lib/daru/io/io.rb @@ -103,7 +103,7 @@ def dataframe_write_csv dataframe, path, opts={} converters: :numeric }.merge(opts) - writer = ::CSV.open(path, 'w', options) + writer = ::CSV.open(path, 'w', **options) writer << dataframe.vectors.to_a unless options[:headers] == false dataframe.each_row do |row| @@ -231,7 +231,7 @@ def from_csv_prepare_converters(converters) def from_csv_hash_with_headers(path, opts) opts[:header_converters] ||= :symbol ::CSV - .parse(open(path), opts) + .parse(open(path), **opts) .tap { |c| yield c if block_given? } .by_col.map { |col_name, values| [col_name, values] }.to_h end