title: How to loop over multiple DataFrames and produce multiple csv?
body: <p>making a change from R to Python I have some difficulties to write multiple csv using pandas from a list of multiple DataFrames:</p>
  
  <pre><code>import pandas
  from dplython import (DplyFrame, X, diamonds, select, sift, sample_n,
                    sample_frac, head, arrange, mutate, group_by, summarize,
                    DelayFunction)
  
  diamonds = [diamonds, diamonds, diamonds]
  path = "/user/me/" 
  
  def extractDiomands(path, diamonds):
      for each in diamonds:
      df = DplyFrame(each) &gt;&gt; select(X.carat, X.cut, X.price) &gt;&gt; head(5)
      df = pd.DataFrame(df) # not sure if that is required
      df.to_csv(os.path.join('.csv', each))
  
  extractDiomands(path,diamonds)
  </code></pre>
  
  <p>That however generates an errors. Appreciate any suggestions!</p>