title: How to save arff files in loop?
body: <p>I'm trying to save dataframes into arff using the arff package. I split the whole dataframe into multiples ones based on an id (from a given column). I would like to save each substraction into an arff. I've done this:</p>
  <pre><code>for i in range(0, len(u)):
      v=df[df[&quot;vehicle_id&quot;]==i]
      v['latitude(m)'] = v['latitude(m)'].multiply(100000000000000)
      v['longitude(m)'] = v['longitude(m)'].multiply(10000000000000000)
      v = v[['time(s)', 'latitude(m)', 'longitude(m)', 'speed(m/s)', 'heading', 'acceleration(m/s²)']]
      arff.dump('v%d.arff %i'
          , v.values
          , relation='relation name'
          , names=v.columns)
  </code></pre>
  <p>However, it only saves the last substraction without the arff extension. How can I name each file in a loop?</p>