Skip to content

ARROW-1639: [Python] Serialize RangeIndex as metadata via Table.from_pandas instead of converting to a column of integers #3868

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 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions python/benchmarks/convert_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,18 @@ def time_deserialize_from_buffer(self):

def time_deserialize_from_components(self):
pa.deserialize_components(self.as_components)


class SerializeDeserializePandas(object):

def setup(self):
# 10 million length
n = 10000000
self.df = pd.DataFrame({'data': np.random.randn(n)})
self.serialized = pa.serialize_pandas(self.df)

def time_serialize_pandas(self):
pa.serialize_pandas(self.df)

def time_deserialize_pandas(self):
pa.deserialize_pandas(self.serialized)
Loading