Dataframe

CommandDescription
polarsOperate with data in a dataframe format.
polars all-falseReturns true if all values are false.
polars all-trueReturns true if all values are true.
polars appendAppends a new dataframe.
polars arg-maxReturn index for max value in series.
polars arg-minReturn index for min value in series.
polars arg-sortReturns indexes for a sorted series.
polars arg-trueReturns indexes where values are true.
polars arg-uniqueReturns indexes for unique values.
polars as-dateConverts string to date.
polars as-datetimeConverts string to datetime.
polars castCast a column to a different dtype.
polars columnsShow dataframe columns.
polars concatenateConcatenates strings with other array.
polars containsChecks if a pattern is contained in a string.
polars count-nullCounts null values.
polars cumulativeCumulative calculation for a series.
polars dropCreates a new dataframe by dropping the selected columns.
polars drop-duplicatesDrops duplicate values in dataframe.
polars drop-nullsDrops null values in dataframe.
polars dummiesCreates a new dataframe with dummy variables.
polars filter-withFilters dataframe using a mask or expression as reference.
polars firstShow only the first number of rows or create a first expression
polars getCreates dataframe with the selected columns.
polars get-dayGets day from date.
polars get-hourGets hour from date.
polars get-minuteGets minute from date.
polars get-monthGets month from date.
polars get-nanosecondGets nanosecond from date.
polars get-ordinalGets ordinal from date.
polars get-secondGets second from date.
polars get-weekGets week from date.
polars get-weekdayGets weekday from date.
polars get-yearGets year from date.
polars into-dfConverts a list, table or record into a dataframe.
polars into-nuConverts a dataframe or an expression into into nushell value for access and exploration.
polars is-duplicatedCreates mask indicating duplicated values.
polars is-not-nullCreates mask where value is not null.
polars is-nullCreates mask where value is null.
polars is-uniqueCreates mask indicating unique values.
polars lastCreates new dataframe with tail rows or creates a last expression.
polars lowercaseLowercase the strings in the column.
polars n-uniqueCounts unique values.
polars notInverts boolean mask.
polars openOpens CSV, JSON, JSON lines, arrow, avro, or parquet file to create dataframe.
polars pivotPivot a DataFrame from wide to long format.
polars queryQuery dataframe using SQL. Note: The dataframe is always named 'df' in your query's from clause.
polars renameRename a dataframe column.
polars replaceReplace the leftmost (sub)string by a regex pattern.
polars replace-allReplace all (sub)strings by a regex pattern.
polars rollingRolling calculation for a series.
polars sampleCreate sample dataframe.
polars schemaShow schema for a dataframe.
polars setSets value where given mask is true.
polars set-with-idxSets value in the given index.
polars shapeShows column and row size for a dataframe.
polars shiftShifts the values by a given period.
polars sliceCreates new dataframe from a slice of rows.
polars store-getGets a Dataframe or other object from the plugin cache.
polars store-lsLists stored polars objects.
polars store-rmRemoves a stored Dataframe or other object from the plugin cache.
polars str-lengthsGet lengths of all strings.
polars str-sliceSlices the string from the start position until the selected length.
polars strftimeFormats date based on string rule.
polars summaryFor a dataframe, produces descriptive statistics (summary statistics) for its numeric columns.
polars takeCreates new dataframe using the given indices.
polars to-arrowSaves dataframe to arrow file.
polars to-avroSaves dataframe to avro file.
polars to-csvSaves dataframe to CSV file.
polars to-jsonlSaves dataframe to a JSON lines file.
polars to-parquetSaves dataframe to parquet file.
polars uniqueReturns unique values from a dataframe.
polars unpivotUnpivot a DataFrame from wide to long format.
polars uppercaseUppercase the strings in the column.
polars value-countsReturns a dataframe with the counts for unique values in series.
polars with-columnAdds a series to the dataframe.