You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Python]: Expose Dataframe.schema() to Python binding #1007
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
(This section helps Arrow developers understand the context and why for this feature, in addition to the what)
In Python, trying to get schema from Dataframe but it is not available in Python binding. Ideally, we should expose all the dataframe methods in Python binding.
Describe the solution you'd like
A clear and concise description of what you want to happen.
In Python, I should able to get schema from dataframe.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
@houqp: I reviewed the current implementation schema() in dataframe_impl.rs and it returns &DFSchema. In Python, how do I return it? Please, review this request and provide your feedback. Thanks.
Activity
mmuru commentedon Sep 15, 2021
@houqp: I reviewed the current implementation schema() in dataframe_impl.rs and it returns &DFSchema. In Python, how do I return it? Please, review this request and provide your feedback. Thanks.
houqp commentedon Sep 19, 2021
I haven't put a lot of thought into this, so take it with a grain of salt ;)
I think one possible solution would be creating a new wrapper struct that wraps the DFSchema type within the python crate, then annotate it with
pyclass(https://pyo3.rs/master/class.html#defining-a-new-class) so the wrapper type can be returned directly to python. You won't be able to return a reference to python, so you need to clone the&DFSchemareference and store it inside the wrapper struct.drauschenbach commentedon Nov 3, 2024
This appears to be resolved. In
datafusion-python, I can calldf.schema(). In any case, this concern has moved to thedatafusion-pythongit repo.andygrove commentedon Nov 3, 2024
Closing this. Thanks @drauschenbach.
perf: Add experimental feature to replace SortMergeJoin with Shuffled…