Skip to content

Commit 68fdfe8

Browse files
committed
Merge remote-tracking branch 'upstream/main' into expr-first
2 parents 652615f + 66559a0 commit 68fdfe8

File tree

123 files changed

+4445
-3353
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+4445
-3353
lines changed

.github/workflows/extremes.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,6 @@ jobs:
124124
matrix:
125125
python-version: ["3.12"]
126126
os: [ubuntu-latest]
127-
env:
128-
KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }}
129-
KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }}
130-
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event.pull_request.head.repo.full_name == github.repository
131127
runs-on: ${{ matrix.os }}
132128
steps:
133129
- uses: actions/checkout@v4

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ repos:
7474
exclude: |
7575
(?x)
7676
^(
77-
narwhals/utils\.py|
77+
narwhals/_utils\.py|
7878
narwhals/stable/v1/_dtypes.py|
7979
narwhals/.*__init__.py|
8080
narwhals/.*typing\.py

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ If you add code that should be tested, please add tests.
174174
- DuckDB / PySpark / anything lazy-only:
175175
176176
- Never assume that your data is ordered in any pre-defined way.
177+
- Never materialise your data (only exception: `collect`).
178+
- Avoid calling the schema / column names unnecessarily.
179+
- For DuckDB, use the Python API as much as possible, only falling
180+
back to SQL as the last resort for operations not yet supported
181+
in their Python API (e.g. `over`).
177182
178183
### Test Failure Patterns
179184

docs/api-reference/expr.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- diff
2222
- drop_nulls
2323
- ewm_mean
24+
- exp
2425
- fill_null
2526
- filter
2627
- first
@@ -36,6 +37,7 @@
3637
- is_nan
3738
- is_null
3839
- is_unique
40+
- kurtosis
3941
- len
4042
- log
4143
- map_batches
@@ -60,6 +62,7 @@
6062
- shift
6163
- sort
6264
- skew
65+
- sqrt
6366
- std
6467
- sum
6568
- tail

docs/api-reference/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@
2525
- [narwhals.exceptions](exceptions.md)
2626
- [narwhals.selectors](selectors.md)
2727
- [narwhals.typing](typing.md)
28+
- [narwhals.utils](utils.md)

docs/api-reference/series.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
- drop_nulls
2727
- dtype
2828
- ewm_mean
29+
- exp
2930
- fill_null
3031
- filter
3132
- first
@@ -45,6 +46,7 @@
4546
- is_sorted
4647
- is_unique
4748
- item
49+
- kurtosis
4850
- len
4951
- log
5052
- max
@@ -71,6 +73,7 @@
7173
- shift
7274
- sort
7375
- skew
76+
- sqrt
7477
- std
7578
- sum
7679
- tail

docs/api-reference/typing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Narwhals comes fully statically typed. In addition to `nw.DataFrame`, `nw.Expr`,
1717
- IntoFrameT
1818
- IntoSeries
1919
- IntoSeriesT
20+
- IntoDType
2021
- SizeUnit
2122
- TimeUnit
2223
- AsofJoinStrategy

docs/api-reference/utils.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# `narwhals.utils`
2+
3+
::: narwhals.utils
4+
handler: python
5+
options:
6+
members:
7+
- parse_version
8+
- Implementation
9+
- Version
10+
show_root_heading: false
11+
show_source: false
12+
show_bases: false

docs/concepts/empty_aggregations.md

Lines changed: 0 additions & 42 deletions
This file was deleted.

docs/how_it_works.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ import pandas as pd
7070
import narwhals as nw
7171
from narwhals._pandas_like.namespace import PandasLikeNamespace
7272
from narwhals._pandas_like.utils import Implementation
73-
from narwhals.utils import parse_version, Version
73+
from narwhals._utils import parse_version, Version
7474

7575
pn = PandasLikeNamespace(
7676
implementation=Implementation.PANDAS,
@@ -96,7 +96,7 @@ import narwhals as nw
9696
from narwhals._pandas_like.namespace import PandasLikeNamespace
9797
from narwhals._pandas_like.utils import Implementation
9898
from narwhals._pandas_like.dataframe import PandasLikeDataFrame
99-
from narwhals.utils import parse_version, Version
99+
from narwhals._utils import parse_version, Version
100100
import pandas as pd
101101

102102
pn = PandasLikeNamespace(
@@ -194,7 +194,7 @@ import narwhals as nw
194194
from narwhals._pandas_like.namespace import PandasLikeNamespace
195195
from narwhals._pandas_like.utils import Implementation
196196
from narwhals._pandas_like.dataframe import PandasLikeDataFrame
197-
from narwhals.utils import parse_version, Version
197+
from narwhals._utils import parse_version, Version
198198
import pandas as pd
199199

200200
pn = PandasLikeNamespace(

0 commit comments

Comments
 (0)