Q: How to populate a data frame from 2 other data frames I am trying to combine two dataframes in an specific way and creat a new dataframe, and avoid for loops.
Assume a dataframe 1 like, 
DF1  
    chan   
1    A01  
2    A02  
3    A03  
4    A04  

and dataframe 2 is:
DF2  
     Len  
1     10  
2     11  
3     12

I need to creat the third dataframe that look like (without using for loops):
DF3  
     chan  Len  
1     A01   10  
2     A01   11  
3     A01   12  
1     A02   10  
2     A02   11  
3     A02   12

Appreciate answers in R and/or python.
Thanks a lot in advance!

A: Adrian, Try
df3 <- expand.grid(df1$chan, df2$Len)


A: I think what you want to do is a cross join. Several packages can help you do this like base R's merge function, join functions from the dplyr package, etc. I like to use the crossing function from the tidyr package.
DF1 <- tibble(Chan = c("A01","A02","A03","A04"))
DF2 <- tibble(Len = 10:12)

tidyr::crossing(A, B)

# A tibble: 12 x 2
   A         B
   <chr> <int>
 1 A01      10
 2 A01      11
 3 A01      12
 4 A02      10
 5 A02      11
 6 A02      12
 7 A03      10
 8 A03      11
 9 A03      12
10 A04      10
11 A04      11
12 A04      12

