XLSX.jl icon indicating copy to clipboard operation
XLSX.jl copied to clipboard

Defaults / interface for XLSX.readtable

Open chris-b1 opened this issue 3 years ago • 0 comments

This feels a bit verbose / hard to remember for reading a DataFrame, especially in an interactive context

df = DataFrame(XLSX.readtable(f, 1, infer_eltypes=true)...)

First, defaults that I would argue for

  • [ ] infer_eltypes=true - this is relatively cheap, and I'd guess what most people want?
  • [ ] Read the first sheet from the file if none is specified

Second, the splat is a bit annoying. Two possible ideas

  • [x] Make readtable return a namedtuple of vectors (or equivalent) that can passed right into DataFrame
  • [x] Add a sink argument like CSV.jl did - something like XLSX.readtable(f, "Sheet1", DataFrame)

I can split up into separate issues on concrete changes, wanted to capture overall picture here

chris-b1 avatar Dec 07 '20 22:12 chris-b1