MCPcopy Create free account
hub / github.com/scanny/python-pptx / index

Method index

src/pptx/chart/data.py:555–565  ·  view source on GitHub ↗

The offset of *sub_category* in the overall sequence of leaf categories.

(self, sub_category)

Source from the content-addressed store, hash-verified

553 return self._parent.index(self)
554
555 def index(self, sub_category):
556 """
557 The offset of *sub_category* in the overall sequence of leaf
558 categories.
559 """
560 index = self._parent.index(self)
561 for this_sub_category in self._sub_categories:
562 if sub_category is this_sub_category:
563 return index
564 index += this_sub_category.leaf_count
565 raise ValueError("sub_category not in this category")
566
567 @property
568 def leaf_count(self):

Callers 4

idxMethod · 0.45
col_idxMethod · 0.45
row_idxMethod · 0.45
_prop_nameMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected