Feather Vs CSV File Format
Why feather data format is better?
I am sure most of you must have worked with CSV files. Have you ever thought you can work with a file format that is more lighter than CSV and 100 times faster to read and write from the disk.
Feather is a portable file format, for storing data frames. CSV’s are costly in terms of space, and read/write time, as compared to this data format known as “Feather”.
Feather data format is a lightweight as well as very fast binary format for storing data frames. Feather file, takes less than half of the space, than the corresponding CSV file, having same data.
Feather files are 100 times faster, while reading and writing from the disk, as compared to CSV files. Feather can work with python, as well as pandas.
We can install feather, using pip install feather format command
# install feather
pip install feather-format
We can write a data frame to disk, using feather, by df.to_feather function
# Write data frame to feather
We can read a feather file , as a data frame in pandas, using pd.read_feather function.
# Read the feather file in pandas
df = pd.read_feather(‘myfile.feather’)
I hope you will try feather file format soon.