Skip to content

Commit

Permalink
docs: Small fixes/clarifications in user guide (#20335)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemanley authored Dec 17, 2024
1 parent a06a5e9 commit 676f10d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/source/src/python/user-guide/misc/arrow_pycapsule.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# --8<-- [end:to_polars]

# --8<-- [start:to_arrow_series]
arrow_chunked_array = pa.array(df["foo"])
arrow_chunked_array = pa.chunked_array(df["foo"])
print(arrow_chunked_array)
# --8<-- [end:to_arrow_series]

Expand Down
8 changes: 4 additions & 4 deletions docs/source/user-guide/transformations/joins.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ The broker has another dataframe called `df_quotes` showing prices it has quoted
--8<-- "python/user-guide/transformations/joins.py:df_quotes"
```

You want to produce a dataframe showing for each trade the most recent quote provided _before_ the
trade. You do this with `join_asof` (using the default `strategy = "backward"`). To avoid joining
between trades on one stock with a quote on another you must specify an exact preliminary join on
the stock column with `by="stock"`.
You want to produce a dataframe showing for each trade the most recent quote provided _on or before_
the time of the trade. You do this with `join_asof` (using the default `strategy = "backward"`). To
avoid joining between trades on one stock with a quote on another you must specify an exact
preliminary join on the stock column with `by="stock"`.

{{code_block('user-guide/transformations/joins','asof', [], ['join_asof'], ['join_asof_by'])}}

Expand Down
2 changes: 2 additions & 0 deletions docs/source/user-guide/transformations/pivot.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
Pivot a column in a `DataFrame` and perform one of the following aggregations:

- first
- last
- sum
- min
- max
- mean
- median
- len

The pivot operation consists of a group by one, or multiple columns (these will be the new y-axis),
the column that will be pivoted (this will be the new x-axis) and an aggregation.
Expand Down
3 changes: 1 addition & 2 deletions docs/source/user-guide/transformations/time-series/filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ In the following example we use a time series of Apple stock prices.

## Filtering by single dates

We can filter by a single date by casting the desired date string to a `Date` object in a filter
expression:
We can filter by a single date using an equality comparison in a filter expression:

{{code_block('user-guide/transformations/time-series/filter','filter',['filter'])}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ calling the string `str.to_date` method and passing the format of the date strin

## Extracting date features from a date column

You can extract data features such as the year or day from a date column using the `.dt` namespace
on a date column:
You can extract data features such as the year or day from a date column using the `.dt` namespace:

{{code_block('user-guide/transformations/time-series/parsing','extract',['dt.year'])}}

Expand Down

0 comments on commit 676f10d

Please sign in to comment.