title: Splitting dataframe into multiple dataframes
body: <p>I have a very large dataframe (around 1 million rows) with data from an experiment (60 respondents).</p>
  <p>I would like to split the dataframe into 60 dataframes (a dataframe for each participant).</p>
  <p>In the dataframe, <code>data</code>, there is a variable called <code>'name'</code>, which is the unique code for each participant.</p>
  <p>I have tried the following, but nothing happens (or execution does not stop within an hour). What I intend to do is to split the <code>data</code> into smaller dataframes, and append these to a list (<code>datalist</code>):</p>
  <pre><code>import pandas as pd
  
  def splitframe(data, name='name'):
      
      n = data[name][0]
  
      df = pd.DataFrame(columns=data.columns)
  
      datalist = []
  
      for i in range(len(data)):
          if data[name][i] == n:
              df = df.append(data.iloc[i])
          else:
              datalist.append(df)
              df = pd.DataFrame(columns=data.columns)
              n = data[name][i]
              df = df.append(data.iloc[i])
          
      return datalist
  </code></pre>
  <p>I do not get an error message, the script just seems to run forever!</p>
  <p>Is there a smart way to do it?</p>