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

Function read_table

python/pyarrow/parquet/core.py:1884–1965  ·  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

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