File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1265,8 +1265,8 @@ def union(self, other) -> 'Axis':
12651265 def intersection (self , other ) -> 'Axis' :
12661266 r"""Return axis with the (set) intersection of this axis labels and other labels.
12671267
1268- In other words, this will use labels from this axis if they are also in other. Labels relative order will be
1269- kept intact.
1268+ In other words, this will use labels from this axis if they are also in
1269+ other. Duplicate labels and labels relative order will be kept intact.
12701270
12711271 Parameters
12721272 ----------
@@ -1290,6 +1290,8 @@ def intersection(self, other) -> 'Axis':
12901290 Axis(['a1', 'a2'], 'a')
12911291 >>> a.intersection(['a1', 'a2', 'a3'])
12921292 Axis(['a1', 'a2'], 'a')
1293+ >>> Axis('a=a0,a1,a0').intersection('a1,a0')
1294+ Axis(['a0', 'a1', 'a0'], 'a')
12931295 """
12941296 non_string_scalar = np .isscalar (other ) and not isinstance (other , str )
12951297 other = [other ] if non_string_scalar else _to_ticks (other )
You can’t perform that action at this time.
0 commit comments