Skip to content

Commit 64b8c70

Browse files
committed
bump narwhals version
1 parent e6e9994 commit 64b8c70

12 files changed

Lines changed: 13 additions & 14 deletions

packages/python/plotly/_plotly_utils/basevalidators.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ def is_homogeneous_array(v):
201201
"""
202202
np = get_module("numpy", should_load=False)
203203
pd = get_module("pandas", should_load=False)
204-
import narwhals as nw
205204
if (
206205
np
207206
and isinstance(v, np.ndarray)

packages/python/plotly/optional-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ ipython
3939

4040
## pandas deps for some matplotlib functionality ##
4141
pandas
42-
narwhals>=1.10.0
42+
narwhals>=1.11.0
4343

4444
## scipy deps for some FigureFactory functions ##
4545
scipy

packages/python/plotly/plotly/express/_core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ def invert_label(args, column):
157157

158158
def _is_continuous(df: nw.DataFrame, col_name: str) -> bool:
159159
if nw.dependencies.is_pandas_like_dataframe(df_native := df.to_native()):
160+
# fastpath for pandas: Narwhals' Series.dtype has a bit of overhead, as it
161+
# tries to distinguish between true "object" columns, and "string" columns
162+
# disguised as "object". But here, we deal with neither.
160163
return df_native[col_name].dtype.kind in 'ifc'
161164
return df.get_column(col_name).dtype.is_numeric()
162165

@@ -1118,9 +1121,6 @@ def to_unindexed_series(x, name=None, native_namespace=None):
11181121
"""
11191122
x = nw.from_native(x, series_only=True, strict=False)
11201123
if isinstance(x, nw.Series):
1121-
if name == x.name:
1122-
# Avoid potentially creating a copy in pre-copy-on-write pandas
1123-
return nw.maybe_reset_index(x)
11241124
return nw.maybe_reset_index(x).rename(name)
11251125
elif native_namespace is not None:
11261126
return nw.new_series(name=name, values=x, native_namespace=native_namespace)

packages/python/plotly/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
###################################################
77

88
## dataframe agnostic layer ##
9-
narwhals>=1.10.0
9+
narwhals>=1.11.0

packages/python/plotly/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def run(self):
603603
data_files=[
604604
("etc/jupyter/nbconfig/notebook.d", ["jupyterlab-plotly.json"]),
605605
],
606-
install_requires=["narwhals>=1.10.0", "packaging"],
606+
install_requires=["narwhals>=1.11.0", "packaging"],
607607
zip_safe=False,
608608
cmdclass=dict(
609609
build_py=js_prerelease(versioneer_cmds["build_py"]),

packages/python/plotly/test_requirements/requirements_310_optional.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ kaleido
2121
orjson==3.8.12
2222
polars[timezone]
2323
pyarrow
24-
narwhals>=1.10.0
24+
narwhals>=1.11.0

packages/python/plotly/test_requirements/requirements_311_optional.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ kaleido
2121
orjson==3.8.12
2222
polars[timezone]
2323
pyarrow
24-
narwhals>=1.10.0
24+
narwhals>=1.11.0

packages/python/plotly/test_requirements/requirements_312_no_numpy_optional.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ kaleido
2020
orjson==3.9.10
2121
polars[timezone]
2222
pyarrow
23-
narwhals>=1.10.0
23+
narwhals>=1.11.0

packages/python/plotly/test_requirements/requirements_312_optional.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ kaleido
2121
orjson==3.9.10
2222
polars[timezone]
2323
pyarrow
24-
narwhals>=1.10.0
24+
narwhals>=1.11.0

packages/python/plotly/test_requirements/requirements_38_optional.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ psutil==5.7.0
2121
kaleido
2222
polars[timezone]
2323
pyarrow
24-
narwhals>=1.10.0
24+
narwhals>=1.11.0

0 commit comments

Comments
 (0)