Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Small fixes/clarifications in user guide #20335

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading