Skip to content

WIP: Use Arrow for Pandas serialization - #643

Closed
mrocklin wants to merge 1 commit into
dask:masterfrom
mrocklin:arrow
Closed

mrocklin wants to merge 1 commit into
dask:masterfrom
mrocklin:arrow

Conversation

@mrocklin

@mrocklin mrocklin commented Nov 9, 2016

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

jreback commented Nov 9, 2016

Copy link
Copy Markdown
Contributor

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