Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas cartesian product

a = [1, 2, 3]
b = ["a", "b", "c"]

index = pd.MultiIndex.from_product([a, b], names = ["a", "b"])

pd.DataFrame(index = index).reset_index()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #cartesian #product
ADD COMMENT
Topic
Name
8+8 =