Method: Daru::IO.from_html
- Defined in:
- lib/daru/io/io.rb
.from_html(path, opts) ⇒ Object
184 185 186 187 188 189 190 191 192 |
# File 'lib/daru/io/io.rb', line 184 def from_html path, opts optional_gem 'mechanize', '~>2.7.5' page = Mechanize.new.get(path) page.search('table').map { |table| html_parse_table table } .keep_if { |table| html_search table, opts[:match] } .compact .map { |table| html_decide_values table, opts } .map { |table| html_table_to_dataframe table } end |