Home Explore Blog CI



nushell

18th chunk of `book/dataframes.md`
c587f36133a1033f6664bdef73a7801b2bc6fb0195ca3d5e0000000100000fd0
| polars into-lazy       | any                   | Converts a dataframe into a lazy dataframe.                                                      |                         |
| polars into-nu         | expression, dataframe | Converts a dataframe or an expression into into nushell value for access and exploration.        |                         |
| polars is-duplicated   | dataframe             | Creates mask indicating duplicated values.                                                       |                         |
| polars is-in           | expression, dataframe | Creates an is-in expression or checks to see if the elements are contained in the right series   | in                      |
| polars is-not-null     | expression, dataframe | Creates mask where value is not null.                                                            |                         |
| polars is-null         | expression, dataframe | Creates mask where value is null.                                                                | `<column_name> == null` |
| polars is-unique       | dataframe             | Creates mask indicating unique values.                                                           |                         |
| polars join            | dataframe             | Joins a lazy frame with other lazy frame.                                                        |                         |
| polars last            | expression, dataframe | Creates new dataframe with tail rows or creates a last expression.                               | last                    |
| polars lit             | any                   | Creates a literal expression.                                                                    |                         |
| polars lowercase       | dataframe             | Lowercase the strings in the column.                                                             |                         |
| polars max             | expression, dataframe | Creates a max expression or aggregates columns to their max value.                               |                         |
| polars mean            | expression, dataframe | Creates a mean expression for an aggregation or aggregates columns to their mean value.          |                         |
| polars median          | expression, dataframe | Median value from columns in a dataframe or creates expression for an aggregation                |                         |
| polars melt            | dataframe             | Unpivot a DataFrame from wide to long format.                                                    |                         |
| polars min             | expression, dataframe | Creates a min expression or aggregates columns to their min value.                               |                         |
| polars n-unique        | expression, dataframe | Counts unique values.                                                                            |                         |
| polars not             | dataframe             | Inverts boolean mask.                                                                            |                         |
| polars open            | any                   | Opens CSV, JSON, JSON lines, arrow, avro, or parquet file to create dataframe.                   | open                    |
| polars otherwise       | any                   | Completes a when expression.                                                                     |                         |
| polars quantile        | expression, dataframe | Aggregates the columns to the selected quantile.                                                 |                         |
| polars query           | dataframe             | Query dataframe using SQL. Note: The dataframe is always named 'df' in your query's from clause. |                         |
| polars rename          | dataframe             | Rename a dataframe column.                                                                       | rename                  |

Title: Polars Dataframe Commands (Continued)
Summary
This section continues the documentation of Polars dataframe commands. It covers converting data types (`into-lazy`, `into-nu`), identifying duplicates and unique values (`is-duplicated`, `is-in`, `is-not-null`, `is-null`, `is-unique`), joining dataframes (`join`), selecting the last rows (`last`), creating literal expressions (`lit`), manipulating strings (`lowercase`), calculating aggregate statistics (`max`, `mean`, `median`, `min`, `n-unique`, `quantile`), inverting boolean masks (`not`), opening files (`open`), completing conditional expressions (`otherwise`), querying with SQL (`query`), and renaming columns (`rename`). The table also includes the corresponding Nushell equivalents where applicable.