The interface between Apache Avro and pandas DataFrame.
pandavro
is available to install from PyPI.
$ pip install pandavro
It prepares like pandas APIs:
from_avro
- Read the records from Avro file and fit them into pandas DataFrame using fastavro.
to_avro
- Write the rows of pandas DataFrame to Avro file with the original schema infer.
import pandavro as pdx
def main():
weather = pdx.from_avro('weather.avro')
print(weather)
pdx.to_avro('weather_out.avro', weather)
if __name__ == '__main__':
main()