Cross Join in Pandas

PHOTO EMBED

Mon Aug 29 2022 12:59:46 GMT+0000 (UTC)

Saved by @ClemensBerteld #python #pandas #dataframe #crossjoin

# Setup fake key in both DataFrames to join on it

df1['key'] = 0
df2['key'] = 0

df1.merge(df2, on='key', how='outer')
content_copyCOPY