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

Method select_as_multiple

pandas/io/pytables.py:1010–1129  ·  view source on GitHub ↗

Retrieve pandas objects from multiple tables. .. warning:: Pandas uses PyTables for reading and writing HDF5 files, which allows serializing object-dtype data with pickle when using the "fixed" format. Loading pickled data received from untrusted s

(
        self,
        keys,
        where=None,
        selector=None,
        columns=None,
        start=None,
        stop=None,
        iterator: bool = False,
        chunksize: int | None = None,
        auto_close: bool = False,
    )

Source from the content-addressed store, hash-verified

1008 return tbl.read_column(column=column, start=start, stop=stop)
1009
1010 def select_as_multiple(
1011 self,
1012 keys,
1013 where=None,
1014 selector=None,
1015 columns=None,
1016 start=None,
1017 stop=None,
1018 iterator: bool = False,
1019 chunksize: int | None = None,
1020 auto_close: bool = False,
1021 ):
1022 """
1023 Retrieve pandas objects from multiple tables.
1024
1025 .. warning::
1026
1027 Pandas uses PyTables for reading and writing HDF5 files, which allows
1028 serializing object-dtype data with pickle when using the "fixed" format.
1029 Loading pickled data received from untrusted sources can be unsafe.
1030
1031 See: https://docs.python.org/3/library/pickle.html for more.
1032
1033 Parameters
1034 ----------
1035 keys : a list of the tables
1036 selector : the table to apply the where criteria (defaults to keys[0]
1037 if not supplied)
1038 columns : the columns I want back
1039 start : integer (defaults to None), row number to start selection
1040 stop : integer (defaults to None), row number to stop selection
1041 iterator : bool, return an iterator, default False
1042 chunksize : nrows to include in iteration, return an iterator
1043 auto_close : bool, default False
1044 Should automatically close the store when finished.
1045
1046 Raises
1047 ------
1048 raises KeyError if keys or selector is not found or keys is empty
1049 raises TypeError if keys is not a list or tuple
1050 raises ValueError if the tables are not ALL THE SAME DIMENSIONS
1051 """
1052 # default to single select
1053 where = _ensure_term(where, scope_level=1)
1054 if isinstance(keys, (list, tuple)) and len(keys) == 1:
1055 keys = keys[0]
1056 if isinstance(keys, str):
1057 return self.select(
1058 key=keys,
1059 where=where,
1060 columns=columns,
1061 start=start,
1062 stop=stop,
1063 iterator=iterator,
1064 chunksize=chunksize,
1065 auto_close=auto_close,
1066 )
1067

Calls 6

selectMethod · 0.95
get_storerMethod · 0.95
get_resultMethod · 0.95
_ensure_termFunction · 0.85
TableIteratorClass · 0.85
popMethod · 0.45