Reading And Writing In Feather Format


  • The primary reason for the existence of Feather is to have a data format using which data frames can be exchanged between Python and R.
  • Feather is a binary data format.
  • Using feather enables faster I/O speeds and less memory. However, since it is an evolving format it is recommended to use it for quick loading and transformation related data processing rather than using it as a long term storage.
  • The example Python program creates a pandas dataframe object from a Python dictionary. The dataframe is persisted into a disk file in Feather format by calling the to_feather() method on the dataframe instance.
  • The contents of the disk file is read back by calling the method read_feather() method of the pandas module and printed onto the console.


import pandas as pd

import feather


pingInfoFilePath = "./";

pingInfo    = {"servername": ["svr_et_1","svr_et_2","svr_wt_1","svr_wt_2","svr_nr_1","svr_nr_2","svr_st_1","svr_st_2"],

                "lastping":["","", "","","","","",""],

                "roundtriptime":[300, 400, 0, 200, 100, 500, 350, 0],



dataFrame   = pd.DataFrame(data=pingInfo);



readFrame = pd.read_feather(pingInfoFilePath, columns=None, use_threads=True);




  servername      lastping  roundtriptime status

0   svr_et_1            300   PASS

1   svr_et_2            400   PASS

2   svr_wt_1              0   FAIL

3   svr_wt_2            200   PASS

4   svr_nr_1            100   PASS

5   svr_nr_2            500   PASS

6   svr_st_1            350   PASS

7   svr_st_2              0   FAIL


Copyright 2020 ©