Initialize a :class:`Schema` wrapper around an Arrow or Pandas schema. Args: base_schema: The underlying Arrow or Pandas schema. data_context: The data context to use for this schema.
(
self,
base_schema: Union["pyarrow.lib.Schema", "PandasBlockSchema"],
*,
data_context: Optional[DataContext] = None,
)
| 7667 | """ |
| 7668 | |
| 7669 | def __init__( |
| 7670 | self, |
| 7671 | base_schema: Union["pyarrow.lib.Schema", "PandasBlockSchema"], |
| 7672 | *, |
| 7673 | data_context: Optional[DataContext] = None, |
| 7674 | ): |
| 7675 | """ |
| 7676 | Initialize a :class:`Schema` wrapper around an Arrow or Pandas schema. |
| 7677 | |
| 7678 | Args: |
| 7679 | base_schema: The underlying Arrow or Pandas schema. |
| 7680 | data_context: The data context to use for this schema. |
| 7681 | """ |
| 7682 | self.base_schema = base_schema |
| 7683 | |
| 7684 | # Snapshot the current context, so that the config of Datasets is always |
| 7685 | # determined by the config at the time it was created. |
| 7686 | self._context = data_context or copy.deepcopy(DataContext.get_current()) |
| 7687 | |
| 7688 | @property |
| 7689 | def names(self) -> List[str]: |
nothing calls this directly
no test coverage detected