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

Would it be difficult to add support for using symbols as keys to ZArray?

Open alex-s-gardner opened this issue 1 year ago • 3 comments

Working with DataFrames, I've become accustomed to using symbols for keys and I'm wondering if it's trivial to add support for this in Zarr?

e.g. z = zopen(path2zarr); z[:var_name]

alex-s-gardner avatar Nov 17 '23 16:11 alex-s-gardner

Would not be difficult at all. Here is the getindex implementation for a ZGroup https://github.com/JuliaIO/Zarr.jl/blob/cbcaeadf9d93ec174b850d90ee6db438d962f140/src/ZGroup.jl#L69-L77 , we could either add a method for k::Symbol or justv convert the keys to Strings in general.

meggart avatar Nov 20 '23 10:11 meggart

A PR would be great.

meggart avatar Nov 20 '23 10:11 meggart

#130

alex-s-gardner avatar Nov 27 '23 17:11 alex-s-gardner