Skip to content

Instantly share code, notes, and snippets.

@LouisAmon
LouisAmon / avro_to_dataframe.py
Created January 15, 2017 11:55
Read Avro file from Pandas
import pandas
import fastavro
def avro_df(filepath, encoding):
# Open file stream
with open(filepath, encoding) as fp:
# Configure Avro reader
reader = fastavro.reader(fp)
# Load records in memory
records = [r for r in reader]