brettatoms / pandavro

Apache Avro <-> pandas DataFrame

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pandavro

Build Status

The interface between Apache Avro and pandas DataFrame.

Installation

pandavro is available to install from PyPI.

$ pip install pandavro

Description

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.

Example

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()

About

Apache Avro <-> pandas DataFrame

License:MIT License


Languages

Language:Python 100.0%