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

into matrix for conversions

Convert a nushell table or list of lists into a matrix.

Signature

> into matrix {flags}

Input/output types:

inputoutput
tablematrix
list<list<number>>matrix

Examples

Convert a list of lists to a matrix

> [[1 2 3] [4 5 6]] | into matrix | matrix into-nu | to nuon
[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]

Convert a list of records to a matrix

> [{a: 1 b: 2} {a: 3 b: 4}] | into matrix | matrix into-nu | to nuon
[[1.0, 2.0], [3.0, 4.0]]