title: Pandas DataFrame from re.findall list
body: <p>How do I create a <code>pandas DataFrame</code> from a <code>re.findall</code> list?</p>
  
  <pre><code>import os
  import pandas as pd
  import re
  
  directory = "/Folder/on/Drive/"
  
  docs = os.listdir(directory)
  for filename in docs:
      if filename.lower().endswith(".pdf"):
          match = re.findall("\D{2}\d{10}", filename)
      df = pd.DataFrame(match, columns=["Match"])
      df.to_csv(directory + "match.csv", index=False, delimiter=",")
  </code></pre>
  
  <p>The above will only write the last result in the list.</p>