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

Method read

pandas/io/pytables.py:3374–3402  ·  view source on GitHub ↗
(
        self,
        where=None,
        columns=None,
        start: int | None = None,
        stop: int | None = None,
    )

Source from the content-addressed store, hash-verified

3372 return None
3373
3374 def read(
3375 self,
3376 where=None,
3377 columns=None,
3378 start: int | None = None,
3379 stop: int | None = None,
3380 ) -> Series:
3381 self.validate_read(columns, where)
3382 index = self.read_index("index", start=start, stop=stop)
3383 values = self.read_array("values", start=start, stop=stop)
3384 try:
3385 result = Series(values, index=index, name=self.name, copy=False)
3386 except UnicodeEncodeError as err:
3387 if (
3388 self.errors == "surrogatepass"
3389 and using_string_dtype()
3390 and str(err).endswith("surrogates not allowed")
3391 and HAS_PYARROW
3392 ):
3393 result = Series(
3394 values,
3395 index=index,
3396 name=self.name,
3397 copy=False,
3398 dtype=StringDtype(storage="python", na_value=np.nan),
3399 )
3400 else:
3401 raise
3402 return result
3403
3404 def write(self, obj, **kwargs) -> None:
3405 super().write(obj, **kwargs)

Callers

nothing calls this directly

Calls 7

SeriesClass · 0.90
using_string_dtypeFunction · 0.90
StringDtypeClass · 0.90
validate_readMethod · 0.80
read_indexMethod · 0.80
read_arrayMethod · 0.80
endswithMethod · 0.80

Tested by

no test coverage detected