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)
The current user who wants to preview the API of the DataFrame need to use the print function to print the result without limit after the collect. The printing result is very unfriendly. It is hoped that the user can print and preview the result of the DataFrame by calling one function.
import pyarrow as pa
from datafusion import ExecutionContext
ctx = ExecutionContext()
batch = pa.RecordBatch.from_arrays(
[pa.array([1, 2, 3]), pa.array([4, 5, 6])],
names=["a", "b"],
)
df = ctx.create_dataframe([[batch]])
for i in df.collect():
for j in i:
print(j)
Result
Describe the solution you'd like
A clear and concise description of what you want to happen.
Let the user call the show function to print and preview the results, the user can customize the number of displayed lines, if not specified, 20 lines will be displayed by default.
eg:
import pyarrow as pa
from datafusion import ExecutionContext
ctx = ExecutionContext()
batch = pa.RecordBatch.from_arrays(
[pa.array([1, 2, 3]), pa.array([4, 5, 6])],
names=["a", "b"],
)
df = ctx.create_dataframe([[batch]])
df.show(10)
Result
+---+---+
| a | b |
+---+---+
| 1 | 4 |
| 2 | 5 |
| 3 | 6 |
+---+---+
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.
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)
The current user who wants to preview the API of the DataFrame need to use the
printfunction to print the result without limit after thecollect. The printing result is very unfriendly. It is hoped that the user can print and preview the result of the DataFrame by calling one function.Result
Describe the solution you'd like
A clear and concise description of what you want to happen.
Let the user call the
showfunction to print and preview the results, the user can customize the number of displayed lines, if not specified, 20 lines will be displayed by default.eg:
Result
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.