Skip to content

Commit

Permalink
docs: add example to Unknown dtype (#1521)
Browse files Browse the repository at this point in the history
  • Loading branch information
camriddell authored Dec 6, 2024
1 parent 3bad94d commit 6f49ff9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion narwhals/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 6f49ff9

Please sign in to comment.