I have 3 lists like in the following reproducible example:
year = [2015, 2016, 2017]
month = [1, 2]
ids = ['x', 'y', 'z', 'w']
What I would like to create is a very simple task of creating a final dataframe where I had the 3 columns sorting its rows as a permutation or cartesian product of the column values.
Something like:
At the end I would like to add an 'Epoque' column where the reference is: December of 2014 is equal to '1', January of 2015 is equal to '2', February of 2015 is equal to '3', and so on (The sequence will continue with initial reference Dec-2014 = '1' (for the 'Epoque' value))...
The final desired output would have this look:
EDIT:
Question edited thanks to the great feedback of @jezrael. He provided me the line missing to achieve the desired df but only missing the 'Epoque' column.
My code suggested would be the following (lacking the 'Epoque' desired column):
import itertools
s = [ [ 2015, 2016, 2017], [1, 2], ['x', 'y', 'z', 'w'] ]
z = list(itertools.product(*s))
df = pd.DataFrame(z) # Trivial line provided kindly by @jezrael I didn't know.
Any help regarding how to achieve the 'Epoque' column efficiently, I would highly appreciate it. Thanks.

