diff --git a/pyprobe/result.py b/pyprobe/result.py index f725b49e..aaa9eee5 100644 --- a/pyprobe/result.py +++ b/pyprobe/result.py @@ -178,6 +178,30 @@ class Result(BaseModel): - :attr:`column_list`: A list of column names. """ + def __repr__(self): + """Provides simple representation of a Result instance.""" + return ( + f" - use .what_can_i_do() to explore" + ) + + def what_can_i_do(self): + """Prints docstring for public methods and attributes of the Result class.""" + from inspect import getdoc + + print(f"\n{self.__class__.__name__} - Available methods and attributes:\n") + + for attr_name in dir(self): + if attr_name.startswith("_"): + continue + attr = getattr(self, attr_name) + if callable(attr): + kind = "Method" + else: + kind = "Attribute" + doc = getdoc(attr) or "No documentation available." + print(f"{kind}: {attr_name}()\n {doc.strip()}\n") + class Config: """Pydantic configuration.""" diff --git a/tests/sample_data/neware/~$sample_data_neware.xlsx b/tests/sample_data/neware/~$sample_data_neware.xlsx new file mode 100644 index 00000000..a80c3983 Binary files /dev/null and b/tests/sample_data/neware/~$sample_data_neware.xlsx differ