Julia package for reading and writing HTML tables.
โฌ๏ธ Installation: use this command in the Julia REPL: using Pkg; Pkg.add("HTMLTables")
Examples:
create an HTML table using a DataFrame
:
using HTMLTables, DataFrames
df = DataFrame([i:i+19 for i in 1:20:501], Symbol.('a':'z'))
HTMLTables.writetable("viridis.html", df, colorscale="viridis")
output:
create a DataFrame
from parsing HTML:
using HTMLTables, DataFrames
url = "https://www.w3schools.com/html/html_tables.asp"
df = HTMLTables.readtable(url, DataFrame)
println(df)
output:
6ร3 DataFrame
Row โ Company Contact Country
โ String String String
โโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1 โ Alfreds Futterkiste Maria Anders Germany
2 โ Centro comercial Moctezuma Francisco Chang Mexico
3 โ Ernst Handel Roland Mendel Austria
4 โ Island Trading Helen Bennett UK
5 โ Laughing Bacchus Winecellars Yoshi Tannamuri Canada
6 โ Magazzini Alimentari Riuniti Giovanni Rovelli Italy