MCPcopy
hub / github.com/ray-project/ray / keys

Method keys

python/ray/data/namespace_expressions/map_namespace.py:154–165  ·  view source on GitHub ↗

Returns a list expression containing the keys of the map. Example: >>> from ray.data.expressions import col >>> # Get keys from map column >>> expr = col("headers").map.keys() Returns: A list expression containing the keys.

(self)

Source from the content-addressed store, hash-verified

152 _expr: "Expr"
153
154 def keys(self) -> "UDFExpr":
155 """Returns a list expression containing the keys of the map.
156
157 Example:
158 >>> from ray.data.expressions import col
159 >>> # Get keys from map column
160 >>> expr = col("headers").map.keys()
161
162 Returns:
163 A list expression containing the keys.
164 """
165 return self._create_projection_udf(MapComponent.KEYS)
166
167 def values(self) -> "UDFExpr":
168 """Returns a list expression containing the values of the map.

Callers 15

_init_argsMethod · 0.45
_remoteMethod · 0.45
__init__Method · 0.45
__dir__Method · 0.45
deep_compareFunction · 0.45
get_config_differencesFunction · 0.45
test_summary_keysMethod · 0.45

Calls 1