Skip to content

Commit f7a1b70

Browse files
committed
docs: clarify describe() summary for non-numeric and binary columns
The describe() docstring claimed only numeric types were summarized, which no longer holds now that binary columns render min/max as hex. Document which statistics apply to which column types.
1 parent 9a65c19 commit f7a1b70

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

  • datafusion/core/src/dataframe

‎datafusion/core/src/dataframe/mod.rs‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -980,8 +980,13 @@ impl DataFrame {
980980

981981
/// Return a new `DataFrame` that has statistics for a DataFrame.
982982
///
983-
/// Only summarizes numeric datatypes at the moment and returns nulls for
984-
/// non numeric datatypes. The output format is modeled after pandas
983+
/// The summary contains the `count`, `null_count`, `mean`, `std`, `min`,
984+
/// `max`, and `median` of each column. `count` and `null_count` are
985+
/// computed for every column; `min` and `max` for every column except
986+
/// `Boolean`; and `mean`, `std`, and `median` only for numeric columns
987+
/// (other columns report `null` for these). `min`/`max` of binary columns
988+
/// (`Binary`, `LargeBinary`, `BinaryView`, `FixedSizeBinary`) are rendered
989+
/// as lowercase hex. The output format is modeled after pandas
985990
///
986991
/// # Example
987992
/// ```

0 commit comments

Comments
 (0)