How to get all combination, cell (row*column mapping) wise in a pandas data-frame

I have a python pandas data-frame like

A B C
1 2 3
4 5 6

All I need is

A B C
1 2 3
1 2 6
1 5 3
1 5 6
4 2 3
4 2 6
4 5 3
4 5 6

Answer

you can use MultiIndex.from_product with each column, then to_frame

res = (
    pd.MultiIndex.from_product([df[col] for col in df], 
                               names=df.columns)
      .to_frame(index=False)
)
print(res)
   A  B  C
0  1  2  3
1  1  2  6
2  1  5  3
3  1  5  6
4  4  2  3
5  4  2  6
6  4  5  3
7  4  5  6

Edit: if you have list or dict in cells, maybe consider to use itertool.product

from itertools import product

res = pd.DataFrame(
    list(product(*[df[col] for col in df])),
    columns=df.columns
)