title: How can I replicate rows in Pandas?
body: <p>My pandas dataframe looks like this:</p>
  <pre><code>   Person  ID   ZipCode   Gender
  0  12345   882  38182     Female
  1  32917   271  88172     Male
  2  18273   552  90291     Female
  </code></pre>
  <p>I want to replicate every row 3 times like:</p>
  <pre><code>   Person  ID   ZipCode   Gender
  0  12345   882  38182     Female
  0  12345   882  38182     Female
  0  12345   882  38182     Female
  1  32917   271  88172     Male
  1  32917   271  88172     Male
  1  32917   271  88172     Male
  2  18273   552  90291     Female
  2  18273   552  90291     Female
  2  18273   552  90291     Female
  </code></pre>
  <p>And of course, reset the index so it is:</p>
  <pre><code>0
  1
  2
  ...
  </code></pre>
  <p>I tried solutions such as:</p>
  <pre><code>pd.concat([df[:5]]*3, ignore_index=True)
  </code></pre>
  <p>And:</p>
  <pre><code>df.reindex(np.repeat(df.index.values, df['ID']), method='ffill')
  </code></pre>
  <p>But none of them worked.</p>