MCPcopy Create free account
hub / github.com/EntilZha/PyFunctional / inner_join

Method inner_join

functional/pipeline.py:1155–1168  ·  view source on GitHub ↗

Sequence and other must be composed of (Key, Value) pairs. If self.sequence contains (K, V) pairs and other contains (K, W) pairs, the return result is a sequence of (K, (V, W)) pairs. Will return only elements where the key exists in both sequences. >>> seq

(self, other)

Source from the content-addressed store, hash-verified

1153 return self._transform(transformations.enumerate_t(start))
1154
1155 def inner_join(self, other):
1156 """
1157 Sequence and other must be composed of (Key, Value) pairs.
1158 If self.sequence contains (K, V) pairs and other contains (K, W) pairs, the return result
1159 is a sequence of (K, (V, W)) pairs. Will return only elements
1160 where the key exists in both sequences.
1161
1162 >>> seq([('a', 1), ('b', 2), ('c', 3)]).inner_join([('a', 2), ('c', 5)])
1163 [('a', (1, 2)), ('c', (3, 5))]
1164
1165 :param other: sequence to join with
1166 :return: joined sequence of (K, (V, W)) pairs
1167 """
1168 return self.join(other, "inner")
1169
1170 def join(self, other, join_type="inner"):
1171 """

Callers 1

test_inner_joinMethod · 0.80

Calls 1

joinMethod · 0.95

Tested by 1

test_inner_joinMethod · 0.64