You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "jorisvandenbossche (via GitHub)" <gi...@apache.org> on 2024/03/26 13:30:56 UTC
[I] [Python][C++] Add method to combine columns of (concat horizontally) two Tables [arrow]
jorisvandenbossche opened a new issue, #40797:
URL: https://github.com/apache/arrow/issues/40797
### Describe the enhancement requested
Similarly like `pd.concat(..., axis=1)` in pandas.
Right now you can do this manually with something like:
```python
import pyarrow as pa
t1 = pa.table({'A': [1, 2, 3],
'B': [4, 5, 6]})
t2 = pa.table({'C': [7, 8, 9],
'D': [10, 11, 12]})
result = pa.Table.from_arrays(
arrays=t1.columns + t2.columns,
names=t1.schema.names + t2.schema.names
)
```
And of course you need to add name uniqueness checks, array length checks, etc if you want it to be robust.
It would be nice to provide a built-in function for this in pyarrow (and potentially in C++?).
### Component(s)
C++, Python
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org