title: Pandas merge or join in smaller dataframe
body: <p>I have an issue whereby I have one long dataframe and one short dataframe, and I want to merge so that the shorter dataframe repeats itself to fill the length of the longer (left) df.</p>
  
  <pre><code>df1:
  
  | Index  | Wafer | Chip | Value |
  ---------------------------------
  | 0      | 1     | 32   | 0.99  |
  | 1      | 1     | 33   | 0.89  |
  | 2      | 1     | 39   | 0.96  |
  | 3      | 2     | 32   | 0.81  |
  | 4      | 2     | 33   | 0.87  |
  
  df2:
  
  | Index  |   x   |   y  |
  -------------------------
  | 0      |   1   |   3  |
  | 1      |   2   |   2  |
  | 2      |   1   |   6  |
  
  
  df_combined:
  
  | Index  | Wafer | Chip | Value |   x   |   y   |
  -------------------------------------------------
  | 0      | 1     | 32   | 0.99  |   1   |   3   |
  | 1      | 1     | 33   | 0.89  |   2   |   2   |
  | 2      | 1     | 39   | 0.96  |   1   |   6   |
  | 3      | 2     | 32   | 0.81  |   1   |   3   |  &lt;--- auto-repeats...
  | 4      | 2     | 33   | 0.87  |   2   |   2   |
  </code></pre>
  
  <p>Is this a built in join/merge-type, or requiring a loop of some sort?</p>
  
  <p>{This is just false data, but dfs are over 1000 rows...}</p>
  
  <p>Current code is a simple outer merge, but doesn't provide the fill/repeat to end:</p>
  
  <p><code>df = main.merge(df_coords, left_index=True, right_index = True, how='outer')</code> and just gives NaNs.</p>
  
  <p>I've checked around:
  <a href="https://stackoverflow.com/questions/33086881/merge-two-python-pandas-data-frames-of-different-length-but-keep-all-rows-in-out">Merge two python pandas data frames of different length but keep all rows in output data frame</a>
  <a href="https://stackoverflow.com/questions/51573267/pandas-duplicate-rows-from-small-dataframe-to-large-based-on-cell-value">pandas: duplicate rows from small dataframe to large based on cell value</a></p>
  
  <p>and it feels like this could be an arguement somewhere in a merge function... but I can't find it.
  Any help gratefully received.</p>
  
  <p>Thanks</p>