javascriptpythongoapache-arrowfeather

Reading Arrow Feather files in GoLang or Javascript


I am looking for a way to read the feather files via GoLang or Javascript, or some other languages that does not require users to do some other extra installation.

My goal is to provide a User-interface to read a feather csv file and convert it back to a human-readable csv. However I can't find much resources on how to work it out.

Currently I have a test feather file generated by below.

import pandas as pd
import datetime
import numpy as np
import pyarrow.feather as feather

# Create a dummy dataframe
todays_date = datetime.datetime.now().date()
index = pd.date_range(todays_date-datetime.timedelta(10), periods=10, freq='D')

columns = ['A','B', 'C']
df = pd.DataFrame(index=index, columns=columns)
df = df.fillna(0) # with 0s rather than NaNs

feather.write_feather(df, 'test_feather.csv')

Thanks in advance.


Solution

  • The Javascript package apache-arrow comes with a script that does exactly this. You can find the source for the script here: https://github.com/apache/arrow/blob/master/js/bin/arrow2csv.js

    If it is not doing exactly what you want the script should serve as an example of how to use the API to read in a feather file.