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] RecordBatch string representation should mimic Table's column preview #35415

Closed
danepitkin opened this issue May 3, 2023 · 0 comments · Fixed by #35416
Closed

[Python] RecordBatch string representation should mimic Table's column preview #35415

danepitkin opened this issue May 3, 2023 · 0 comments · Fixed by #35416

Comments

@danepitkin
Copy link
Member

Describe the enhancement requested

Before

>>> import pyarrow as pa
>>> n_legs = pa.array([2, 2, 4, 4, 5, 100])
>>> animals = pa.array(["Flamingo", "Parrot", "Dog", "Horse", "Brittle stars", "Centipede"])
>>> batch = pa.record_batch([n_legs, animals], names=["n_legs", "animals"])

>>> batch
pyarrow.RecordBatch
n_legs: int64
animals: string

After

>>> batch
pyarrow.RecordBatch
n_legs: int64
animals: string
----
n_legs: [2,2,4,4,5,100]
animals: ["Flamingo","Parrot","Dog","Horse","Brittle stars","Centipede"]

Component(s)

Python

AlenkaF pushed a commit that referenced this issue May 8, 2023
…review (#35416)

### Rationale for this change

Table and RecordBatch now share a common parent class and common APIs should behave the same.

### What changes are included in this PR?

Remove override of RecordBatch string representation.

### Are these changes tested?

Pytests and doctests updated.

### Are there any user-facing changes?

Yes, the string representation of `RecordBatch` includes additional info.
* Closes: #35415

Authored-by: Dane Pitkin <dane@voltrondata.com>
Signed-off-by: Alenka Frim <frim.alenka@gmail.com>
@AlenkaF AlenkaF added this to the 13.0.0 milestone May 8, 2023
liujiacheng777 pushed a commit to LoongArch-Python/arrow that referenced this issue May 11, 2023
…lumn preview (apache#35416)

### Rationale for this change

Table and RecordBatch now share a common parent class and common APIs should behave the same.

### What changes are included in this PR?

Remove override of RecordBatch string representation.

### Are these changes tested?

Pytests and doctests updated.

### Are there any user-facing changes?

Yes, the string representation of `RecordBatch` includes additional info.
* Closes: apache#35415

Authored-by: Dane Pitkin <dane@voltrondata.com>
Signed-off-by: Alenka Frim <frim.alenka@gmail.com>
ArgusLi pushed a commit to Bit-Quill/arrow that referenced this issue May 15, 2023
…lumn preview (apache#35416)

### Rationale for this change

Table and RecordBatch now share a common parent class and common APIs should behave the same.

### What changes are included in this PR?

Remove override of RecordBatch string representation.

### Are these changes tested?

Pytests and doctests updated.

### Are there any user-facing changes?

Yes, the string representation of `RecordBatch` includes additional info.
* Closes: apache#35415

Authored-by: Dane Pitkin <dane@voltrondata.com>
Signed-off-by: Alenka Frim <frim.alenka@gmail.com>
rtpsw pushed a commit to rtpsw/arrow that referenced this issue May 16, 2023
…lumn preview (apache#35416)

### Rationale for this change

Table and RecordBatch now share a common parent class and common APIs should behave the same.

### What changes are included in this PR?

Remove override of RecordBatch string representation.

### Are these changes tested?

Pytests and doctests updated.

### Are there any user-facing changes?

Yes, the string representation of `RecordBatch` includes additional info.
* Closes: apache#35415

Authored-by: Dane Pitkin <dane@voltrondata.com>
Signed-off-by: Alenka Frim <frim.alenka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants