From 6f49ff9ea4fa2a1bba2f71946fbb745eb46f67b0 Mon Sep 17 00:00:00 2001 From: Cameron <96146940+camriddell@users.noreply.github.com> Date: Fri, 6 Dec 2024 08:42:25 -0800 Subject: [PATCH] docs: add example to Unknown dtype (#1521) --- narwhals/dtypes.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/narwhals/dtypes.py b/narwhals/dtypes.py index f8c6b67c3..81f10033a 100644 --- a/narwhals/dtypes.py +++ b/narwhals/dtypes.py @@ -363,7 +363,17 @@ class Object(DType): class Unknown(DType): - """Type representing DataType values that could not be determined statically.""" + """Type representing DataType values that could not be determined statically. + + Examples: + >>> import pandas as pd + >>> import narwhals as nw + >>> data = pd.period_range("2000-01", periods=4, freq="M") + >>> ser_pd = pd.Series(data) + + >>> nw.from_native(ser_pd, series_only=True).dtype + Unknown + """ class Datetime(TemporalType):