HTMLTables.jl

Julia package for reading and writing HTML tables using the Tables.jl interface
Author cecoeco
Popularity
7 Stars
Updated Last
7 Days Ago
Started In
March 2024
CI test DOI Package Statistics Style: Blue

HTMLTables

Julia package for reading and writing HTML tables.

๐Ÿ“– Documentation: Documentation Stable Documentation Dev

โฌ‡๏ธ 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:

viridis table example

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

Used By Packages