Skip to content

WIP: Use Arrow for Pandas serialization #643

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

Closed
wants to merge 1 commit into from

Conversation

mrocklin
Copy link
Member

@mrocklin mrocklin commented Nov 9, 2016

This adds experimental support for custom Pandas serialization using Arrow.

There is some missing functionality here. I'm not sure if this is due to things missing within Arrow or my naive use of arrow (I'm just copy-pasting a solution from #614 ):

  1. Indexes
  2. Categoricals
  3. Series without an extra copy

cc @wesm


def deserialize_pandas_series(header, frames):
df = deserialize_pandas_dataframe(header, frames)
return df[df.columns[0]] # unfortunate copy here
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not a copy :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah indeed, my apologies.



def serialize_pandas_series(s):
return serialize_pandas_dataframe(s.to_frame()) # unfortunate copy here
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is also not s copy iirc (if i am not remembering correctly it's easy to make this not a copy)

@jreback
Copy link
Contributor

jreback commented Nov 9, 2016

for 1) you can do preserve index by
.reset_index() and record the column

if u want

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

Successfully merging this pull request may close these issues.

2 participants