Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/datafusion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@
SQLOptions,
)
from .dataframe import DataFrame, ParquetColumnOptions, ParquetWriterOptions
from .dataframe_formatter import configure_formatter
from .expr import (
Expr,
WindowFrame,
)
from .html_formatter import configure_formatter
from .io import read_avro, read_csv, read_json, read_parquet
from .plan import ExecutionPlan, LogicalPlan
from .record_batch import RecordBatch, RecordBatchStream
Expand Down
15 changes: 14 additions & 1 deletion python/datafusion/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
import polars as pl
import pyarrow as pa

from datafusion._internal import DataFrame as DataFrameInternal
from datafusion._internal import expr as expr_internal

from enum import Enum
Expand Down Expand Up @@ -323,6 +322,20 @@ def __repr__(self) -> str:
def _repr_html_(self) -> str:
return self.df._repr_html_()

@staticmethod
def default_str_repr(
batches: list[pa.RecordBatch],
schema: pa.Schema,
has_more: bool,
table_uuid: str | None = None,
) -> str:
"""Return the default string representation of a DataFrame.

This method is used by the default formatter and implemented in Rust for
performance reasons.
"""
return DataFrameInternal.default_str_repr(batches, schema, has_more, table_uuid)

def describe(self) -> DataFrame:
"""Return the statistics for this DataFrame.

Expand Down
Loading