# \[ANN\]: JDF.jl v0.2.3 - DataFrames serialization format for Julia

**URL:** <https://discourse.julialang.org/t/ann-jdf-jl-v0-2-3-dataframes-serialization-format-for-julia/30644>\
**Category:** Package Announcements\
**Created:** [November 3, 2019, 4:08am UTC](https://discourse.julialang.org/t/ann-jdf-jl-v0-2-3-dataframes-serialization-format-for-julia/30644 "2019-11-03T04:08:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [November 3, 2019, 4:08am UTC](https://discourse.julialang.org/t/ann-jdf-jl-v0-2-3-dataframes-serialization-format-for-julia/30644/1 "2019-11-03T04:08:02Z")

</div>

See [GitHub - xiaodaigh/JDF.jl: Julia DataFrames serialization format](https://github.com/xiaodaigh/JDF.jl)

JDF is the Julia DataFrames serialization format. It’s a specialised serialization format and hence doesn’t support arbitrary objects like JLD2 and JLSO. However, for the formats it supports it typically results in smaller file size, faster save/load, and is less likely to have difficult to resolve bugs.

## New functionality

### On disk access to metadata

One can now refer to the JDF file on disk and obtain some metadata from it including column names, and `nrow` and `ncol`.

E.g.

```julia-auto
using DataFrames, JDF
df = DataFrames(a = 1:3, b = 1:3, c = 1:3)
savejdf(df, "df.jdf")

df_ondisk = jdf"df.jdf"

names(df_ondisk)

nrow(df_ondisk)

nrow(df_ondisk)

```

### Selective loading of columns

One can use the `cols` argument in `loadjdf` to load selected columns. For example, to load columns `:a` and `:c`, we do

```julia-auto
df_cols_a_c = loadjdf("df.jdf", cols = [:a, :c])

```

### `eachcol` iterator directly from disk

Without loading the whole dataframe into RAM, JDF allows you to iterate through each column

```julia-auto
for col in eachol(df_ondisk)
  # col is the column
end

```

to iterate through the names and it’s corresponding column, we do

```julia-auto
for (name, col) in zip(names(df_ondisk), eachol(df_ondisk))
  # col is the column
end

```

## New supported types

This version supports a few data types including

- `Char`
- `TimeZones.ZonedDateTime` (experimental)
- `Symbol`

in addition to the types it already supports which include

- `WeakRefStrings.StringVector`
- `Vector{T}` , `Vector{Union{Mising, T}}` , `Vector{Union{Nothing, T}}`
- `CategoricalArrays.CategoricalVetors{T}`

where `T` can be `String` , `Bool` , `Symbol` , `Char` , `TimeZones.ZonedDateTime` (experimental) and `isbits` types i.e. `UInt*` , `Int*` , and `Float*``Date*` types etc.

See [previous announcement](https://discourse.julialang.org/t/ann-jdf-jl-v0-2-0-julia-dataframes-serialization-format/30217)
