title: AttributeError: 'list' object has no attribute 'loc'
body: <p>I have a few dataframes from an API set as variables shown in the list of data. When I tried to perform some functions the error shows:</p>
  <p>AttributeError: 'list' object has no attribute 'loc'</p>
  <pre><code>data = ['dataA','dataB','dataC','dataD']
  
  for i in data:
       exec('{} = pd.DataFrame()'.format(i))
  
  for i in data:
      ma = 6
  
      smaString = &quot;SMA&quot; + str(ma)
  
      data[smaString] = data.iloc[:,3].rolling(window = ma).mean()
  
      data = data.iloc[ma:]
  </code></pre>
  <p>Any help would be highly appreciated.
  Thanks.</p>