Home Explore Blog CI



nushell

17th chunk of `book/dataframes.md`
34aa095a2776856dba9fffd9221829c327edf0ec03f6ef1a0000000100000fd0
| polars filter-with     | dataframe             | Filters dataframe using a mask or expression as reference.                                       |                         |
| polars first           | expression, dataframe | Show only the first number of rows or create a first expression                                  | first                   |
| polars flatten         | expression, dataframe | An alias for polars explode.                                                                     |                         |
| polars get             | dataframe             | Creates dataframe with the selected columns.                                                     | get                     |
| polars get-day         | dataframe             | Gets day from date.                                                                              |                         |
| polars get-hour        | dataframe             | Gets hour from date.                                                                             |                         |
| polars get-minute      | dataframe             | Gets minute from date.                                                                           |                         |
| polars get-month       | dataframe             | Gets month from date.                                                                            |                         |
| polars get-nanosecond  | dataframe             | Gets nanosecond from date.                                                                       |                         |
| polars get-ordinal     | dataframe             | Gets ordinal from date.                                                                          |                         |
| polars get-second      | dataframe             | Gets second from date.                                                                           |                         |
| polars get-week        | dataframe             | Gets week from date.                                                                             |                         |
| polars get-weekday     | dataframe             | Gets weekday from date.                                                                          |                         |
| polars get-year        | dataframe             | Gets year from date.                                                                             |                         |
| polars group-by        | dataframe             | Creates a group-by object that can be used for other aggregations.                               | group-by                |
| polars implode         | expression            | Aggregates a group to a Series.                                                                  |                         |
| polars into-df         | any                   | Converts a list, table or record into a dataframe.                                               |                         |
| 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` |

Title: Polars Dataframe Commands (Continued)
Summary
This section continues the documentation of Polars dataframe commands. It covers filtering (`filter-with`), selecting the first rows (`first`), flattening data (`flatten`), retrieving columns (`get`), extracting date components (`get-day` through `get-year`), grouping data (`group-by`), aggregating to series (`implode`), converting data types (`into-df`, `into-lazy`, `into-nu`), identifying duplicates (`is-duplicated`), checking membership (`is-in`), and handling null values (`is-not-null`, `is-null`). The table also includes the corresponding Nushell equivalents where applicable.