You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe what feature you would like to see implemented.
Implement cross join (cartesian product) - every row of the left Frame combined with every row of the right Frame.
For example, in pandas: cross_df = pd.merge(left_df, right_df, how='cross')
conceptually, this works but is very slow: cross_dt = dt.rbind([dt.cbind(left_dt[i, :], right_dt[j, :]) for i in range(left_dt.nrows) for j in range(right_dt.nrows)])
If possible, give an example of how it may look in the code and what result
will be produced.
In my case, I use this to create the full-factorial combination of two dataframes. Each (relatively small and manageable) dataframe essentially contains sweeps of independent variables. It's easy to work with the small dataframes and then kick off a cross-join to combine them to create the much larger combined dataframe.
Implement cross join (cartesian product) - every row of the left Frame combined with every row of the right Frame.
For example, in pandas:
cross_df = pd.merge(left_df, right_df, how='cross')
conceptually, this works but is very slow:
cross_dt = dt.rbind([dt.cbind(left_dt[i, :], right_dt[j, :]) for i in range(left_dt.nrows) for j in range(right_dt.nrows)])
will be produced.
Click "Preview" to check that there are no formatting problems, that the
request is stated clearly, and that it is not overbroad in scope.
Thanks for contributing. We appreciate your input!
The text was updated successfully, but these errors were encountered: