Make a MultiIndex from the cartesian product of multiple iterables.
Each iterable has unique labels for each level of the index.
Level of sortedness (must be lexicographically sorted by that level).
Names for the levels in the index. If not explicitly provided, names will be inferred from the elements of iterables if an element has a name attribute.
Examples
>>> numbers = [0, 1, 2] >>> colors = ["green", "purple"] >>> pd.MultiIndex.from_product([numbers, colors], names=["number", "color"]) MultiIndex([(0, 'green'), (0, 'purple'), (1, 'green'), (1, 'purple'), (2, 'green'), (2, 'purple')], names=['number', 'color'])
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4