You can use itertools:
import itertools as it
pd.DataFrame(list(it.product(df1[0], df2[0])))
0 1
0 A1 2016-01-01
1 A1 2016-01-02
2 A2 2016-01-01
3 A2 2016-01-02
itertools returns a generator, so you need to convert it to a list before converting it to a DataFrame
it.product performs all combinations between two iterable objects, for example:
["".join(i) for i in it.product("ABC", "ABC")]
['AA', 'AB', 'AC', 'BA', 'BB', 'BC', 'CA', 'CB', 'CC']
source
share