ak.forms.Form#
Defined in awkward.forms.form on line 384.
- class ak.forms.Form(self)#
- ak.forms.Form._init(self, *, parameters, form_key)#
- ak.forms.Form.form_key#
- ak.forms.Form.__str__(self)#
- ak.forms.Form.to_dict(self, verbose=True)#
- ak.forms.Form._to_dict_extra(self, out, verbose)#
- ak.forms.Form.to_json(self)#
- ak.forms.Form._repr_args(self)#
- ak.forms.Form.type#
- ak.forms.Form.columns(self, list_indicator=None, column_prefix=())#
- ak.forms.Form.select_columns(self, specifier, expand_braces=True, *, prune_unions_and_records=True)#
select_columns returns a new Form with only columns and sub-columns selected. Returns an empty Form if no columns matched the specifier(s).
specifier
can be a str | Iterable[str | Iterable[str]]
.
Strings may include shell-globbing-style wildcards “*” and “?”.
If expand_braces
is True
(the default), strings may include alternatives in braces.
For example, ["a.{b,c}.d"]
is equivalent to ["a.b.d", "a.c.d"]
.
Glob-style matching would also suit this single-character instance: "a.[bc].d"
.
If specifier is a list which contains a list/tuple, that inner list will be interpreted as
column and subcolumn specifiers. They may contain wildcards, but “.” will not be
interpreted as a <field>.<subfield>
pattern.
- ak.forms.Form.column_types(self)#
- ak.forms.Form._columns(self, path, output, list_indicator)#
- ak.forms.Form._prune_columns(self, is_inside_record_or_union)#
- ak.forms.Form._select_columns(self, match_specifier)#
- ak.forms.Form._column_types(self)#
- ak.forms.Form._to_dict_part(self, verbose, toplevel)#
- ak.forms.Form.length_zero_array(self, *, backend=numpy_backend, highlevel=False, behavior=None)#
- ak.forms.Form.length_one_array(self, *, backend=numpy_backend, highlevel=False, behavior=None)#
- ak.forms.Form._expected_from_buffers(self, getkey, recursive)#
- ak.forms.Form.expected_from_buffers(self, buffer_key='{form_key}-{attribute}', recursive=True)#
- Parameters:
buffer_key (str or callable) – Python format string containing
"{form_key}"
and/or"{attribute}"
or a function that takes these as keyword arguments and returns a string to use as a key for a buffer in thecontainer
.recursive (bool) – If True, recurse into subforms; otherwise, yield only the (buffer_key, dtype) pairs for this form object.
Yield (buffer_key, dtype) pairs describing the expected buffer keys,
and their corresponding dtypes, that a call to ak.from_buffers
would
be expected to find from the container
object.
- ak.forms.Form.is_equal_to(self, other, *, all_parameters=False, form_key=False)#
- ak.forms.Form.__eq__ = is_equal_to#
- ak.forms.Form._is_equal_to(self, other, all_parameters, form_key)#
- ak.forms.Form._is_equal_to_generic(self, other, all_parameters, form_key)#