We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 380f25d commit ecee4eaCopy full SHA for ecee4ea
src/nested_pandas/series/nestedseries.py
@@ -1,11 +1,16 @@
1
+from functools import wraps
2
+
3
import pandas as pd
4
5
from nested_pandas.series.dtype import NestedDtype
6
7
+__all__ = ["NestedSeries"]
8
9
10
def nested_only(func):
11
"""Decorator to designate certain functions can only be used with NestedDtype."""
12
13
+ @wraps(func) # This ensures the original function's metadata is preserved
14
def wrapper(*args, **kwargs):
15
if not isinstance(args[0].dtype, NestedDtype):
16
raise TypeError(f"'{func.__name__}' can only be used with a NestedDtype, not '{args[0].dtype}'.")
0 commit comments