Skip to content
FileIO.jl integration for Feather files
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Add docs template Feb 23, 2019
src Complete coverage Feb 27, 2019
test Migrate to Project.toml Apr 27, 2019
.codecov.yml FeatherFiles.jl generated files. Jun 8, 2017
.gitignore Update .gitignore Jun 1, 2019
.travis.yml Add julia 1.2 to CI config Jun 1, 2019
LICENSE.md Update LICENSE Apr 27, 2019
NEWS.md Update NEWS Apr 27, 2019
Project.toml Update some [compat] bounds May 13, 2019
README.md Drop broken badge from README Apr 27, 2019
appveyor.yml Add julia 1.2 to CI config Jun 1, 2019

README.md

FeatherFiles

Project Status: Active - The project has reached a stable, usable state and is being actively developed. Build Status Build status codecov.io

Overview

This package provides load and save support for Feather files under the FileIO.jl package.

Installation

Use Pkg.add("FeatherFiles") in Julia to install FeatherFiles and its dependencies.

Usage

Load a feather file

To read a feather file into a DataFrame, use the following julia code:

using FeatherFiles, DataFrames

df = DataFrame(load("data.feather"))

The call to load returns a struct that is an IterableTable.jl, so it can be passed to any function that can handle iterable tables, i.e. all the sinks in IterableTable.jl. Here are some examples of materializing a feather file into data structures that are not a DataFrame:

using FeatherFiles, DataTables, IndexedTables, TimeSeries, Temporal, Gadfly

# Load into a DataTable
dt = DataTable(load("data.feather"))

# Load into an IndexedTable
it = IndexedTable(load("data.feather"))

# Load into a TimeArray
ta = TimeArray(load("data.feather"))

# Load into a TS
ts = TS(load("data.feather"))

# Plot directly with Gadfly
plot(load("data.feather"), x=:a, y=:b, Geom.line)

Save a feather file

The following code saves any iterable table as a feather file:

using FeatherFiles

save("output.feather", it)

This will work as long as it is any of the types supported as sources in IterableTables.jl.

Using the pipe syntax

Both load and save also support the pipe syntax. For example, to load a feather file into a DataFrame, one can use the following code:

using FeatherFiles, DataFrame

df = load("data.feather") |> DataFrame

To save an iterable table, one can use the following form:

using FeatherFiles, DataFrame

df = # Aquire a DataFrame somehow

df |> save("output.feather")

The pipe syntax is especially useful when combining it with Query.jl queries, for example one can easily load a feather file, pipe it into a query, then pipe it to the save function to store the results in a new file.

You can’t perform that action at this time.