@@ -429,7 +429,7 @@ def _from_native_impl( # noqa: PLR0915
429
429
elif hasattr (native_object , "__narwhals_series__" ):
430
430
if not allow_series :
431
431
if strict :
432
- msg = "Please set `allow_series=True`"
432
+ msg = "Please set `allow_series=True` or `series_only=True` "
433
433
raise TypeError (msg )
434
434
return native_object
435
435
return Series (
@@ -477,7 +477,7 @@ def _from_native_impl( # noqa: PLR0915
477
477
pl = get_polars ()
478
478
if not allow_series :
479
479
if strict :
480
- msg = "Please set `allow_series=True`"
480
+ msg = "Please set `allow_series=True` or `series_only=True` "
481
481
raise TypeError (msg )
482
482
return native_object
483
483
return Series (
@@ -509,7 +509,7 @@ def _from_native_impl( # noqa: PLR0915
509
509
elif is_pandas_series (native_object ):
510
510
if not allow_series :
511
511
if strict :
512
- msg = "Please set `allow_series=True`"
512
+ msg = "Please set `allow_series=True` or `series_only=True` "
513
513
raise TypeError (msg )
514
514
return native_object
515
515
pd = get_pandas ()
@@ -544,7 +544,7 @@ def _from_native_impl( # noqa: PLR0915
544
544
mpd = get_modin ()
545
545
if not allow_series :
546
546
if strict :
547
- msg = "Please set `allow_series=True`"
547
+ msg = "Please set `allow_series=True` or `series_only=True` "
548
548
raise TypeError (msg )
549
549
return native_object
550
550
return Series (
@@ -578,7 +578,7 @@ def _from_native_impl( # noqa: PLR0915
578
578
cudf = get_cudf ()
579
579
if not allow_series :
580
580
if strict :
581
- msg = "Please set `allow_series=True`"
581
+ msg = "Please set `allow_series=True` or `series_only=True` "
582
582
raise TypeError (msg )
583
583
return native_object
584
584
return Series (
@@ -611,7 +611,7 @@ def _from_native_impl( # noqa: PLR0915
611
611
pa = get_pyarrow ()
612
612
if not allow_series :
613
613
if strict :
614
- msg = "Please set `allow_series=True`"
614
+ msg = "Please set `allow_series=True` or `series_only=True` "
615
615
raise TypeError (msg )
616
616
return native_object
617
617
return Series (
0 commit comments