Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign into preallocated array #22

Open
martindurant opened this issue Aug 23, 2017 · 0 comments
Open

Assign into preallocated array #22

martindurant opened this issue Aug 23, 2017 · 0 comments

Comments

@martindurant
Copy link
Contributor

martindurant commented Aug 23, 2017

The current method is to create numpy arrays (or lists) for a given chunk of a given block.

The creation of a pandas dataframe from numpy arrays, and the concatenation of dataframes are memory and time inefficient. Would be much better to allocate a dataframe up front as is done in fastparquet and assign into it. The dtypes come from the parsed global file header.
Any nested fields would be Object type (although non-repeated structures could be flattened, also implemented in fastparquet).

An avro block states how many records and bytes it has at the head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant