From 881e6ac0c7a272defc9f48f58f6d5fee966c321f Mon Sep 17 00:00:00 2001 From: Stijn de Gooijer Date: Mon, 25 Sep 2023 07:24:53 +0200 Subject: [PATCH] Update links --- docs/_build/API_REFERENCE_LINKS.yml | 131 ++++++++++++++---- .../expressions/column-selections.md | 2 +- docs/user-guide/expressions/lists.md | 6 +- docs/user-guide/expressions/strings.md | 8 +- docs/user-guide/expressions/structs.md | 4 +- docs/user-guide/io/aws.md | 2 +- .../transformations/time-series/parsing.md | 2 +- .../transformations/time-series/rolling.md | 2 +- 8 files changed, 115 insertions(+), 42 deletions(-) diff --git a/docs/_build/API_REFERENCE_LINKS.yml b/docs/_build/API_REFERENCE_LINKS.yml index 06ff9622766c..d68415e84f5f 100644 --- a/docs/_build/API_REFERENCE_LINKS.yml +++ b/docs/_build/API_REFERENCE_LINKS.yml @@ -18,9 +18,7 @@ python: max: https://pola-rs.github.io/polars/py-polars/html/reference/series/api/polars.Series.max.html value_counts: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.value_counts.html unnest: https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/api/polars.DataFrame.unnest.html - field: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.struct.field.html struct: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.struct.html - rename_fields: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.struct.rename_fields.html is_duplicated: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.is_duplicated.html sample: https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/api/polars.DataFrame.sample.html head: https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/api/polars.DataFrame.head.html @@ -33,7 +31,7 @@ python: fold: https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/api/polars.DataFrame.fold.html concat_str: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.concat_str.html str.split: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.split.html - Expr.List: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/list.html + Expr.list: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/list.html element: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.element.html all: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.all.html exclude: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.exclude.html @@ -101,20 +99,17 @@ python: pivot: https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/api/polars.DataFrame.pivot.html melt: https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/api/polars.DataFrame.melt.html is_between: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.is_between.html - year: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.dt.year.html + date_range: https://pola-rs.github.io/polars/py-polars/html/reference/api/polars.date_range.html upsample: https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/api/polars.DataFrame.upsample.html group_by_dynamic: https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/api/polars.DataFrame.group_by_dynamic.html - explode: https://pola-rs.github.io/polars/py-polars/html/reference/dataframe/api/polars.DataFrame.explode.html cast: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.cast.html np.log: name: log link: https://numpy.org/doc/stable/reference/generated/numpy.log.html feature_flags: ['numpy'] - lengths: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.lengths.html - n_chars: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.n_chars.html Array: https://pola-rs.github.io/polars/py-polars/html/reference/api/polars.Array.html - arr: https://pola-rs.github.io/polars/py-polars/html/reference/series/array.html + Series.arr: https://pola-rs.github.io/polars/py-polars/html/reference/series/array.html Series.dt.day: https://pola-rs.github.io/polars/py-polars/html/reference/series/api/polars.Series.dt.day.html selectors: https://pola-rs.github.io/polars/py-polars/html/reference/selectors.html @@ -136,17 +131,22 @@ python: link: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.dt.replace_time_zone.html feature_flags: ['timezone'] dt.to_string: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.dt.to_string.html + dt.year: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.dt.year.html - starts_with: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.starts_with.html - ends_with: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.ends_with.html - extract: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.extract.html - extract_all: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.extract_all.html - + str.starts_with: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.starts_with.html + str.ends_with: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.ends_with.html + str.extract: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.extract.html + str.extract_all: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.extract_all.html str.contains: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.contains.html str.replace: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.replace.html str.replace_all: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.replace_all.html str.to_datetime: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.to_datetime.html str.to_date: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.to_date.html + str.n_chars: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.n_chars.html + str.lengths: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.str.lengths.html + + struct.field: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.struct.field.html + struct.rename_fields: https://pola-rs.github.io/polars/py-polars/html/reference/expressions/api/polars.Expr.struct.rename_fields.html rust: DataFrame: https://pola-rs.github.io/polars/docs/rust/dev/polars/frame/struct.DataFrame.html @@ -159,10 +159,26 @@ rust: filter: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/frame/struct.LazyFrame.html#method.filter with_columns: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/frame/struct.LazyFrame.html#method.with_columns group_by: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/frame/struct.LazyFrame.html#method.group_by + group_by_dynamic: + name: group_by_dynamic + link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/frame/struct.LazyFrame.html#method.group_by_dynamic + feature_flags: [dynamic_group_by] join: https://pola-rs.github.io/polars/docs/rust/dev/polars_core/frame/hash_join/index.html hstack: https://pola-rs.github.io/polars/docs/rust/dev/polars_core/frame/struct.DataFrame.html#method.hstack concat: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/functions/fn.concat.html SQLContext: https://pola-rs.github.io/polars/py-polars/html/reference/sql.html + + operators: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Operator.html + + Array: https://pola-rs.github.io/polars/docs/rust/dev/polars/datatypes/enum.DataType.html#variant.Array + + DataFrame.explode: https://pola-rs.github.io/polars/docs/rust/dev/polars/frame/struct.DataFrame.html#method.explode + pivot: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/frame/pivot/fn.pivot.html + melt: https://pola-rs.github.io/polars/docs/rust/dev/polars/frame/struct.DataFrame.html#method.melt + upsample: https://pola-rs.github.io/polars/docs/rust/dev/polars/frame/struct.DataFrame.html#method.upsample + join_asof: https://pola-rs.github.io/polars/docs/rust/dev/polars/prelude/trait.AsofJoin.html#method.join_asof + unnest: https://pola-rs.github.io/polars/docs/rust/dev/polars/frame/struct.DataFrame.html#method.unnest + read_csv: name: CsvReader link: https://pola-rs.github.io/polars/docs/rust/dev/polars_io/csv/struct.CsvReader.html @@ -227,7 +243,12 @@ rust: name: collect link: https://pola-rs.github.io/polars/docs/rust/dev/polars/prelude/struct.LazyFrame.html#method.collect feature_flags: ['streaming'] + col: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/fn.col.html + element: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/fn.col.html + all: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/functions/fn.all.html + when: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/fn.when.html + sort: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.sort arr.eval: name: arr @@ -246,8 +267,31 @@ rust: map: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.map apply: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.apply over: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.over + + alias: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.alias + approx_n_unique: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.approx_n_unique cast: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.cast + exclude: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.exclude + fill_nan: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.fill_nan fill_null: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.fill_null + n_unique: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.n_unique + null_count: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.null_count + interpolate: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.interpolate + is_between: https://github.com/pola-rs/polars/issues/11285 + is_duplicated: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.is_duplicated + is_null: https://pola-rs.github.io/polars/docs/rust/dev/polars/prelude/enum.Expr.html#method.is_null + value_counts: + name: value_counts + link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/enum.Expr.html#method.value_counts + feature_flags: [dtype-struct] + + Expr.list: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/struct.ListNameSpace.html + Series.arr: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/struct.ArrayNameSpace.html + + date_range: + name: date_range + link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/functions/fn.date_range.html + feature_flags: [range, dtype-date] selectors: https://github.com/pola-rs/polars/issues/10594 cs.numeric: https://github.com/pola-rs/polars/issues/10594 @@ -259,6 +303,36 @@ rust: is_selector: https://github.com/pola-rs/polars/issues/10594 selector_column_names: https://github.com/pola-rs/polars/issues/10594 + dt.convert_time_zone: + name: dt.convert_time_zone + link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/dt/struct.DateLikeNameSpace.html#method.convert_time_zone + feature_flags: [timezones] + dt.replace_time_zone: + name: dt.replace_time_zone + link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/dt/struct.DateLikeNameSpace.html#method.replace_time_zone + feature_flags: [timezones] + dt.to_string: + name: dt.to_string + link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/dt/struct.DateLikeNameSpace.html#method.to_string + feature_flags: [temporal] + dt.year: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/dt/struct.DateLikeNameSpace.html#method.year + Series.dt.day: + name: dt.day + link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/dt/struct.DateLikeNameSpace.html#method.day + feature_flags: [temporal] + + list.eval: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/trait.ListNameSpaceExtension.html#method.eval + + str.contains: + name: str.contains + link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/string/struct.StringNameSpace.html#method.contains + feature_flags: [regex] + str.extract: + name: str.extract + link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/string/struct.StringNameSpace.html#method.extract + str.extract_all: + name: str.extract_all + link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/string/struct.StringNameSpace.html#method.extract_all str.replace: name: str.replace link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/string/struct.StringNameSpace.html#method.replace @@ -267,6 +341,11 @@ rust: name: str.replace_all link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/string/struct.StringNameSpace.html#method.replace_all feature_flags: [regex] + str.starts_with: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/string/struct.StringNameSpace.html#method.starts_with + str.ends_with: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/string/struct.StringNameSpace.html#method.ends_with + str.split: + name: str.split + link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/string/struct.StringNameSpace.html#method.split str.to_date: name: str.replace_all link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/string/struct.StringNameSpace.html#method.to_date @@ -275,20 +354,14 @@ rust: name: str.replace_all link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/string/struct.StringNameSpace.html#method.to_datetime feature_flags: [dtype-datetime] + str.n_chars: + name: str.n_chars + link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/string/struct.StringNameSpace.html#method.n_chars + str.lengths: + name: str.lengths + link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/string/struct.StringNameSpace.html#method.lengths - dt.convert_time_zone: - name: dt.convert_time_zone - link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/dt/struct.DateLikeNameSpace.html#method.convert_time_zone - feature_flags: [timezones] - dt.replace_time_zone: - name: dt.replace_time_zone - link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/dt/struct.DateLikeNameSpace.html#method.replace_time_zone - feature_flags: [timezones] - dt.to_string: - name: dt.to_string - link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/dt/struct.DateLikeNameSpace.html#method.to_string - feature_flags: [temporal] - Series.dt.day: - name: dt.day - link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/dt/struct.DateLikeNameSpace.html#method.day - feature_flags: [temporal] + struct.rename_fields: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/struct.StructNameSpace.html#method.rename_fields + struct.field: + name: struct.field_by_name + link: https://pola-rs.github.io/polars/docs/rust/dev/polars_lazy/dsl/struct.StructNameSpace.html#method.field_by_name diff --git a/docs/user-guide/expressions/column-selections.md b/docs/user-guide/expressions/column-selections.md index bc9557ebf043..9c9579411ba4 100644 --- a/docs/user-guide/expressions/column-selections.md +++ b/docs/user-guide/expressions/column-selections.md @@ -47,7 +47,7 @@ Specifying multiple strings allows expressions to _expand_ to all matching colum Multiple column selection is possible by regular expressions also, by making sure to wrap the regex by `^` and `$` to let `pl.col` know that a regex selection is expected: -{{code_block('user-guide/expressions/column-selections','expansion_by_regex',[''])}} +{{code_block('user-guide/expressions/column-selections','expansion_by_regex',[])}} ```python exec="on" result="text" session="user-guide/column-selections" --8<-- "python/user-guide/expressions/column-selections.py:expansion_by_regex" diff --git a/docs/user-guide/expressions/lists.md b/docs/user-guide/expressions/lists.md index b7c508f11b90..467c663aafd5 100644 --- a/docs/user-guide/expressions/lists.md +++ b/docs/user-guide/expressions/lists.md @@ -39,7 +39,7 @@ However, in Polars, we often do not need to do this to operate on the `List` ele Polars provides several standard operations on `List` columns. If we want the first three measurements, we can do a `head(3)`. The last three can be obtained via a `tail(3)`, or alternately, via `slice` (negative indexing is supported). We can also identify the number of observations via `lengths`. Let's see them in action: -{{code_block('user-guide/expressions/lists','list_ops',['Expr.List'])}} +{{code_block('user-guide/expressions/lists','list_ops',['Expr.list'])}} ```python exec="on" result="text" session="user-guide/lists" --8<-- "python/user-guide/expressions/lists.py:list_ops" @@ -60,7 +60,7 @@ If we need to identify the stations that are giving the most number of errors fr The third step requires a casting (or alternately, a regex pattern search) operation to be perform on each element of the list. We can do this using by applying the operation on each element by first referencing them in the `pl.element()` context, and then calling a suitable Polars expression on them. Let's see how: -{{code_block('user-guide/expressions/lists','count_errors',['Expr.List', 'element'])}} +{{code_block('user-guide/expressions/lists','count_errors',['Expr.list', 'element'])}} ```python exec="on" result="text" session="user-guide/lists" --8<-- "python/user-guide/expressions/lists.py:count_errors" @@ -110,7 +110,7 @@ We can define `Array` columns in this manner: Basic operations are available on it: -{{code_block('user-guide/expressions/lists','array_ops',['arr'])}} +{{code_block('user-guide/expressions/lists','array_ops',['Series.arr'])}} ```python exec="on" result="text" session="user-guide/lists" --8<-- "python/user-guide/expressions/lists.py:array_ops" diff --git a/docs/user-guide/expressions/strings.md b/docs/user-guide/expressions/strings.md index fd7735eece72..9f00f7b1268e 100644 --- a/docs/user-guide/expressions/strings.md +++ b/docs/user-guide/expressions/strings.md @@ -8,7 +8,7 @@ String processing functions are available in the `str` namespace. The `str` namespace can be accessed through the `.str` attribute of a column with `Utf8` data type. In the following example, we create a column named `animal` and compute the length of each element in the column in terms of the number of bytes and the number of characters. If you are working with ASCII text, then the results of these two computations will be the same, and using `lengths` is recommended since it is faster. -{{code_block('user-guide/expressions/strings','df',['lengths','n_chars'])}} +{{code_block('user-guide/expressions/strings','df',['str.lengths','str.n_chars'])}} ```python exec="on" result="text" session="user-guide/strings" --8<-- "python/user-guide/expressions/strings.py:setup" @@ -23,7 +23,7 @@ The `str` namespace can be accessed through the `.str` attribute of a column wit To check for the presence of a pattern within a string, we can use the contains method. The `contains` method accepts either a regular substring or a regex pattern, depending on the value of the `literal` parameter. If the pattern we're searching for is a simple substring located either at the beginning or end of the string, we can alternatively use the `starts_with` and `ends_with` functions. -{{code_block('user-guide/expressions/strings','existence',['str.contains', 'starts_with','ends_with'])}} +{{code_block('user-guide/expressions/strings','existence',['str.contains', 'str.starts_with','str.ends_with'])}} ```python exec="on" result="text" session="user-guide/strings" --8<-- "python/user-guide/expressions/strings.py:existence" @@ -33,7 +33,7 @@ To check for the presence of a pattern within a string, we can use the contains The `extract` method allows us to extract a pattern from a specified string. This method takes a regex pattern containing one or more capture groups, which are defined by parentheses `()` in the pattern. The group index indicates which capture group to output. -{{code_block('user-guide/expressions/strings','extract',['extract'])}} +{{code_block('user-guide/expressions/strings','extract',['str.extract'])}} ```python exec="on" result="text" session="user-guide/strings" --8<-- "python/user-guide/expressions/strings.py:extract" @@ -41,7 +41,7 @@ The `extract` method allows us to extract a pattern from a specified string. Thi To extract all occurrences of a pattern within a string, we can use the `extract_all` method. In the example below, we extract all numbers from a string using the regex pattern `(\d+)`, which matches one or more digits. The resulting output of the `extract_all` method is a list containing all instances of the matched pattern within the string. -{{code_block('user-guide/expressions/strings','extract_all',['extract_all'])}} +{{code_block('user-guide/expressions/strings','extract_all',['str.extract_all'])}} ```python exec="on" result="text" session="user-guide/strings" --8<-- "python/user-guide/expressions/strings.py:extract_all" diff --git a/docs/user-guide/expressions/structs.md b/docs/user-guide/expressions/structs.md index 9973e61d4c68..ee0012fe4db4 100644 --- a/docs/user-guide/expressions/structs.md +++ b/docs/user-guide/expressions/structs.md @@ -52,7 +52,7 @@ Polars will interpret a `dict` sent to the `Series` constructor as a `Struct`: Let's say that we needed to obtain just the `movie` value in the `Series` that we created above. We can use the `field` method to do so: -{{code_block('user-guide/expressions/structs','series_struct_extract',['field'])}} +{{code_block('user-guide/expressions/structs','series_struct_extract',['struct.field'])}} ```python exec="on" result="text" session="user-guide/structs" --8<-- "python/user-guide/expressions/structs.py:series_struct_extract" @@ -62,7 +62,7 @@ Let's say that we needed to obtain just the `movie` value in the `Series` that w What if we need to rename individual `field`s of a `Struct` column? We first convert the `rating_Series` object to a `DataFrame` so that we can view the changes easily, and then use the `rename_fields` method: -{{code_block('user-guide/expressions/structs','series_struct_rename',['rename_fields'])}} +{{code_block('user-guide/expressions/structs','series_struct_rename',['struct.rename_fields'])}} ```python exec="on" result="text" session="user-guide/structs" --8<-- "python/user-guide/expressions/structs.py:series_struct_rename" diff --git a/docs/user-guide/io/aws.md b/docs/user-guide/io/aws.md index e19efc74b580..27c9cfeaf453 100644 --- a/docs/user-guide/io/aws.md +++ b/docs/user-guide/io/aws.md @@ -17,4 +17,4 @@ located on an AWS bucket. Load a `.parquet` file using: -{{code_block('user-guide/io/aws','bucket',['from_arrow'])}} +{{code_block('user-guide/io/aws','bucket',[])}} diff --git a/docs/user-guide/transformations/time-series/parsing.md b/docs/user-guide/transformations/time-series/parsing.md index cdd536b08c82..62bdb0a44b8f 100644 --- a/docs/user-guide/transformations/time-series/parsing.md +++ b/docs/user-guide/transformations/time-series/parsing.md @@ -40,7 +40,7 @@ You can also cast a column of datetimes encoded as strings to a datetime type. Y You can extract data features such as the year or day from a date column using the `.dt` namespace on a date column: -{{code_block('user-guide/transformations/time-series/parsing','extract',['year'])}} +{{code_block('user-guide/transformations/time-series/parsing','extract',['dt.year'])}} ```python exec="on" result="text" session="user-guide/transformations/ts/parsing" --8<-- "python/user-guide/transformations/time-series/parsing.py:extract" diff --git a/docs/user-guide/transformations/time-series/rolling.md b/docs/user-guide/transformations/time-series/rolling.md index a88373caada2..f3e009f99b76 100644 --- a/docs/user-guide/transformations/time-series/rolling.md +++ b/docs/user-guide/transformations/time-series/rolling.md @@ -103,7 +103,7 @@ Below we show an example where we use **group_by_dynamic** to compute: - the number of days until the end of the month - the number of days in a month -{{code_block('user-guide/transformations/time-series/rolling','group_by_dyn',['group_by_dynamic','explode','date_range'])}} +{{code_block('user-guide/transformations/time-series/rolling','group_by_dyn',['group_by_dynamic','DataFrame.explode','date_range'])}} ```python exec="on" result="text" session="user-guide/transformations/ts/rolling" --8<-- "python/user-guide/transformations/time-series/rolling.py:group_by_dyn"