Skip to content

Latest commit

 

History

History
33 lines (23 loc) · 680 Bytes

File metadata and controls

33 lines (23 loc) · 680 Bytes
layout api-command
language Python
permalink api/python/set_intersection/
command set_intersection
related_commands
union difference set_insert set_union set_difference
union/
difference/
set_insert/
set_union/
set_difference/

Command syntax

{% apibody %} array.set_intersection(array) → array {% endapibody %}

Description

Intersect two arrays returning values that occur in both of them as a set (an array with distinct values).

Example: Check which pieces of equipment Iron Man has from a fixed list.

r.table('marvel').get('IronMan')['equipment'].set_intersection(['newBoots', 'arc_reactor']).run(conn)