MCPcopy Create free account
hub / github.com/apache/arrow / read_table

Function read_table

python/pyarrow/parquet/core.py:1879–1960  ·  view source on GitHub ↗
(source, *, columns=None, use_threads=True,
               schema=None, use_pandas_metadata=False, read_dictionary=None,
               binary_type=None, list_type=None, memory_map=False, buffer_size=0,
               partitioning="hive", filesystem=None, filters=None,
               ignore_prefixes=None, pre_buffer=True,
               coerce_int96_timestamp_unit=None,
               decryption_properties=None, thrift_string_size_limit=None,
               thrift_container_size_limit=None,
               page_checksum_verification=False,
               arrow_extensions_enabled=True)

Source from the content-addressed store, hash-verified

1877
1878
1879def read_table(source, *, columns=None, use_threads=True,
1880 schema=None, use_pandas_metadata=False, read_dictionary=None,
1881 binary_type=None, list_type=None, memory_map=False, buffer_size=0,
1882 partitioning="hive", filesystem=None, filters=None,
1883 ignore_prefixes=None, pre_buffer=True,
1884 coerce_int96_timestamp_unit=None,
1885 decryption_properties=None, thrift_string_size_limit=None,
1886 thrift_container_size_limit=None,
1887 page_checksum_verification=False,
1888 arrow_extensions_enabled=True):
1889
1890 try:
1891 dataset = ParquetDataset(
1892 source,
1893 schema=schema,
1894 filesystem=filesystem,
1895 partitioning=partitioning,
1896 memory_map=memory_map,
1897 read_dictionary=read_dictionary,
1898 binary_type=binary_type,
1899 list_type=list_type,
1900 buffer_size=buffer_size,
1901 filters=filters,
1902 ignore_prefixes=ignore_prefixes,
1903 pre_buffer=pre_buffer,
1904 coerce_int96_timestamp_unit=coerce_int96_timestamp_unit,
1905 decryption_properties=decryption_properties,
1906 thrift_string_size_limit=thrift_string_size_limit,
1907 thrift_container_size_limit=thrift_container_size_limit,
1908 page_checksum_verification=page_checksum_verification,
1909 arrow_extensions_enabled=arrow_extensions_enabled,
1910 )
1911 except ImportError:
1912 # fall back on ParquetFile for simple cases when pyarrow.dataset
1913 # module is not available
1914 if filters is not None:
1915 raise ValueError(
1916 "the 'filters' keyword is not supported when the "
1917 "pyarrow.dataset module is not available"
1918 )
1919 if partitioning != "hive":
1920 raise ValueError(
1921 "the 'partitioning' keyword is not supported when the "
1922 "pyarrow.dataset module is not available"
1923 )
1924 if schema is not None:
1925 raise ValueError(
1926 "the 'schema' argument is not supported when the "
1927 "pyarrow.dataset module is not available"
1928 )
1929 if isinstance(source, list):
1930 raise ValueError(
1931 "the 'source' argument cannot be a list of files "
1932 "when the pyarrow.dataset module is not available"
1933 )
1934
1935 filesystem, path = _resolve_filesystem_and_path(source, filesystem)
1936 if filesystem is not None:

Callers 1

read_pandasFunction · 0.70

Calls 6

readMethod · 0.95
ParquetDatasetClass · 0.85
ParquetFileClass · 0.85
get_file_infoMethod · 0.45
open_input_fileMethod · 0.45

Tested by

no test coverage detected