A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://arrow.apache.org/docs/python/generated/pyarrow.dataset.Partitioning.html below:

pyarrow.dataset.Partitioning — Apache Arrow v21.0.0

pyarrow.dataset.Partitioning#
class pyarrow.dataset.Partitioning#

Bases: _Weakrefable

__init__(*args, **kwargs)#

Methods

Attributes

format(self, expr)#

Convert a filter expression into a tuple of (directory, filename) using the current partitioning scheme

Parameters:
exprpyarrow.dataset.Expression
Returns:
tuple[str, str]

Examples

Specify the Schema for paths like “/2009/June”:

>>> import pyarrow as pa
>>> import pyarrow.dataset as ds
>>> import pyarrow.compute as pc
>>> part = ds.partitioning(pa.schema([("year", pa.int16()),
...                                   ("month", pa.string())]))
>>> part.format(
...     (pc.field("year") == 1862) & (pc.field("month") == "Jan")
... )
('1862/Jan', '')
parse(self, path)#

Parse a path into a partition expression.

Parameters:
pathstr
Returns:
pyarrow.dataset.Expression
schema#

The arrow Schema attached to the partitioning.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4