@@ -511,7 +511,37 @@ export interface Bincode<T> {
511511 * Functions that can be applied to dtype List
512512 */
513513export interface ListFunctions < T > {
514+ /**
515+ * Retrieve the index of the minimal value in every sublist.
516+ * @returns Expression of data type :class:`UInt32` or :class:`UInt64`
517+ * @example
518+ * --------
519+ * ```
520+ * const s0 = pl.Series("a", [[1, 2], [2, 1]]);
521+ * s0.lst.argMax();
522+ * Series: 'a' [u32]
523+ * [
524+ * 0
525+ * 1
526+ * ]
527+ * ```
528+ */
514529 argMin ( ) : T ;
530+ /**
531+ * Retrieve the index of the maximum value in every sublist.
532+ * @returns Expression of data type :class:`UInt32` or :class:`UInt64`
533+ * @example
534+ * --------
535+ * ```
536+ * const s0 = pl.Series("a", [[1, 2], [2, 1]]);
537+ * s0.lst.argMax();
538+ * Series: 'a' [u32]
539+ * [
540+ * 1
541+ * 0
542+ * ]
543+ * ```
544+ */
515545 argMax ( ) : T ;
516546 /**
517547 * Concat the arrays in a Series dtype List in linear time.
@@ -541,6 +571,7 @@ export interface ListFunctions<T> {
541571 /**
542572 * Check if sublists contain the given item.
543573 * @param item Item that will be checked for membership
574+ * @param nullBehavior - bool, default True If True, treat null as a distinct value. Null values will not propagate.
544575 * @example
545576 * --------
546577 * ```
@@ -561,7 +592,7 @@ export interface ListFunctions<T> {
561592 * ```
562593 * @category List
563594 */
564- contains ( item : any ) : T ;
595+ contains ( item : any , nullBehavior ?: boolean ) : T ;
565596 /**
566597 * Calculate the n-th discrete difference of every sublist.
567598 * @param n number of slots to shift
@@ -582,22 +613,30 @@ export interface ListFunctions<T> {
582613 diff ( n ?: number , nullBehavior ?: "ignore" | "drop" ) : T ;
583614 /**
584615 * Get the value by index in the sublists.
585- * So index `0` would return the first item of every sublist
586- * and index `-1` would return the last item of every sublist
587- * if an index is out of bounds, it will return a `null`.
616+ * @param index - Index to return per sublist
617+ * @param nullOnOob - Behavior if an index is out of bounds:
618+ * True -> set as null
619+ * False -> raise an error
620+ * @example
621+ * -------
622+ * ```
623+ * const s0 = pl.Series("a", [[1, 2], [2, 1]]);
624+ * s0.lst.get(0);
625+ * Series: 'a' [f64]
626+ [
627+ 1.0
628+ 2.0
629+ ]
630+ * ```
588631 * @category List
589632 */
590- get ( index : number | Expr ) : T ;
633+ get ( index : number | Expr , nullOnOob ?: boolean ) : T ;
591634 /**
592635 * Run any polars expression against the lists' elements
593636 * Parameters
594637 * ----------
595638 * @param expr
596639 * Expression to run. Note that you can select an element with `pl.first()`, or `pl.col()`
597- * @param parallel
598- * Run all expression parallel. Don't activate this blindly.
599- * Parallelism is worth it if there is enough work to do per thread.
600- * This likely should not be use in the groupby context, because we already parallel execution per group
601640 * @example
602641 * >df = pl.DataFrame({"a": [1, 8, 3], "b": [4, 5, 2]})
603642 * >df.withColumn(
@@ -617,7 +656,7 @@ export interface ListFunctions<T> {
617656 * └─────┴─────┴────────────┘
618657 * @category List
619658 */
620- eval ( expr : Expr , parallel ?: boolean ) : T ;
659+ eval ( expr : Expr ) : T ;
621660 /**
622661 * Get the first value of the sublists.
623662 * @category List
@@ -797,7 +836,7 @@ export interface DateFunctions<T> {
797836 */
798837 second ( ) : T ;
799838 /**
800- * Format Date/datetime with a formatting rule: See [chrono strftime/strptime](https://docs.rs/chrono/0.4.19 /chrono/format/strftime/index.html).
839+ * Format Date/datetime with a formatting rule: See [chrono strftime/strptime](https://docs.rs/chrono/0.4.41 /chrono/format/strftime/index.html).
801840 */
802841 strftime ( fmt : string ) : T ;
803842 /** Return timestamp in ms as Int64 type. */
0 commit comments