Skip to content

Commit c36425a

Browse files
committed
Small adjustments based on user feedback
1 parent f04b973 commit c36425a

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

python/datafusion/dataframe.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,20 @@ def __repr__(self) -> str:
322322
def _repr_html_(self) -> str:
323323
return self.df._repr_html_()
324324

325+
@staticmethod
326+
def default_str_repr(
327+
batches: list[pa.RecordBatch],
328+
schema: pa.Schema,
329+
has_more: bool,
330+
table_uuid: str | None = None,
331+
) -> str:
332+
"""Return the default string representation of a DataFrame.
333+
334+
This method is used by the default formatter and implemented in Rust for
335+
performance reasons.
336+
"""
337+
return DataFrameInternal.default_str_repr(batches, schema, has_more, table_uuid)
338+
325339
def describe(self) -> DataFrame:
326340
"""Return the statistics for this DataFrame.
327341
@@ -1111,17 +1125,3 @@ def fill_null(self, value: Any, subset: list[str] | None = None) -> DataFrame:
11111125
- For columns not in subset, the original column is kept unchanged
11121126
"""
11131127
return DataFrame(self.df.fill_null(value, subset))
1114-
1115-
@staticmethod
1116-
def default_str_repr(
1117-
batches: list[pa.RecordBatch],
1118-
schema: pa.Schema,
1119-
has_more: bool,
1120-
table_uuid: str | None = None,
1121-
) -> str:
1122-
"""Return the default string representation of a DataFrame.
1123-
1124-
This method is used by the default formatter and implemented in Rust for
1125-
performance reasons.
1126-
"""
1127-
return DataFrameInternal.default_str_repr(batches, schema, has_more, table_uuid)

python/datafusion/html_formatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
"The module 'html_formatter' is deprecated and will be removed in the next release."
2626
"Please use 'dataframe_formatter' instead.",
2727
DeprecationWarning,
28-
stacklevel=2,
28+
stacklevel=3,
2929
)

0 commit comments

Comments
 (0)