Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

polars summary for dataframe

For a dataframe, produces descriptive statistics (summary statistics) for its numeric columns.

This command requires a plugin

The polars summary command resides in the polars plugin. To use this command, you must install and register nu_plugin_polars. See the Plugins chapter in the book for more information.

Signature

> polars summary {flags}

Flags

  • --quantiles, -q {list<float>}: provide optional quantiles

Input/output types:

inputoutput
anyany

Examples

list dataframe descriptives

> [[a b]; [1 1] [1 1]] | polars into-df | polars summary
╭───┬────────────┬─────────┬─────────╮
│ # │ descriptor │ a (i64) │ b (i64) │
├───┼────────────┼─────────┼─────────┤
│ 0 │ count      │    2.00 │    2.00 │
│ 1 │ sum        │    2.00 │    2.00 │
│ 2 │ mean       │    1.00 │    1.00 │
│ 3 │ median     │    1.00 │    1.00 │
│ 4 │ std        │    0.00 │    0.00 │
│ 5 │ min        │    1.00 │    1.00 │
│ 6 │ 25%        │    1.00 │    1.00 │
│ 7 │ 50%        │    1.00 │    1.00 │
│ 8 │ 75%        │    1.00 │    1.00 │
│ 9 │ max        │    1.00 │    1.00 │
╰───┴────────────┴─────────┴─────────╯