title: Loop to Store multiple pandas dataframe into a List
body: <p>I'm a beginner python user and I am wondering if it is possible to store multiple <code>dataframes</code> that is generated from a loop, into a list. </p>
  
  <p>Unfortunately, I do not have a reproducible example. What I am trying to do is to read in a directory of pdf files, make row 0 into the header, drop that row and store it into one <code>dataframe</code> within a list.</p>
  
  <pre><code>master_df= []
  for i in range(1, len(pdffiles)):
      df = read_pdf(pdffiles[i])
      df.columns = df.iloc[0,] #get col names
      df = df.reindex(df.index.drop(0)) #drop first row
      df = df.replace(np.nan, '', regex=True, inplace = True)
      master_df = df
  </code></pre>
  
  <p>This is the code that I have but I am getting this error at <code>df.columns, reindex</code> and <code>replace</code>.</p>
  
  <blockquote>
    <p>AttributeError: 'NoneType' object has no attribute 'replace'</p>
  </blockquote>
  
  <p>Could anyone point me in the right direction?</p>
  
  <p>Update: </p>
  
  <p>May I ask why the following code does not work? I'm trying to parse in a <code>continue</code> when the dataframe is not a None set.</p>
  
  <pre><code>master_df = []
  for i in range(len(pdffiles)):
      df = read_pdf(pdffiles[i])
      if df is not None:
          continue
      df.columns = df.iloc[0,:] # get col names
      df = df.reindex(df.index.drop(0)) # drop first row
      df = df.fillna('')
      master_df.append(df)
  </code></pre>