MCPcopy
hub / github.com/pandas-dev/pandas / __init__

Method __init__

pandas/io/pytables.py:566–597  ·  view source on GitHub ↗
(
        self,
        path,
        mode: str = "a",
        complevel: int | None = None,
        complib=None,
        fletcher32: bool = False,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

564 _mode: str
565
566 def __init__(
567 self,
568 path,
569 mode: str = "a",
570 complevel: int | None = None,
571 complib=None,
572 fletcher32: bool = False,
573 **kwargs,
574 ) -> None:
575 if "format" in kwargs:
576 raise ValueError("format is not a defined argument for HDFStore")
577
578 tables = import_optional_dependency("tables")
579
580 if complib is not None and complib not in tables.filters.all_complibs:
581 raise ValueError(
582 f"complib only supports {tables.filters.all_complibs} compression."
583 )
584
585 if complib is None and complevel is not None:
586 complib = tables.filters.default_complib
587
588 self._path = stringify_path(path)
589 if mode is None:
590 mode = "a"
591 self._mode = mode
592 self._handle = None
593 self._complevel = complevel if complevel else 0
594 self._complib = complib
595 self._fletcher32 = fletcher32
596 self._filters = None
597 self.open(mode=mode, **kwargs)
598
599 def __fspath__(self) -> str:
600 return self._path

Callers

nothing calls this directly

Calls 3

openMethod · 0.95
stringify_pathFunction · 0.90

Tested by

no test coverage detected