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

[Python] Pandas to arrow conversion slowed down by local imports #21165

Closed
asfimport opened this issue Feb 19, 2019 · 1 comment
Closed

[Python] Pandas to arrow conversion slowed down by local imports #21165

asfimport opened this issue Feb 19, 2019 · 1 comment

Comments

@asfimport
Copy link

The pandas to arrow conversion is currently slowed down significantly by various local import statements.

import pandas as pd
import pyarrow as pa
import cProfile
ser = pd.Series(range(10000))
df = pd.DataFrame({col: ser.copy(deep=True) for col in range(50)})
# Simulate a real dataset, i.e. force copy of data
df = df.astype({col: str for col in range(25)})
prof = cProfile.Profile()

prof.enable()
# a few times to collect statistics
for _ in range(100):
    pa.Table.from_pandas(df, nthreads=1)
prof.disable()
prof.dump_stats("array_conversion.prof")

image-2019-02-19-19-10-46-330.png

Reporter: Florian Jetter / @fjetter
Assignee: Florian Jetter / @fjetter

Original Issue Attachments:

PRs and other links:

Note: This issue was originally created as ARROW-4629. Please see the migration documentation for further details.

@asfimport
Copy link
Author

Uwe Korn / @xhochy:
Issue resolved by pull request 3706
#3706

@asfimport asfimport added this to the 0.12.1 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant