擅长:python、mysql、java
<p>可以使用locals(),所以应该是这样的:</p>
<pre><code>feedin_a = pd.Dataframe
feedin_b = pd.Dataframe
feedin_c = pd.Dataframe
name_list = ['a', 'b', 'c']
for name in list:
key = 'feedin_{}'.format(name)
df.new[key] = locals()[key]
</code></pre>
<p>同时检查这个<a href="https://stackoverflow.com/questions/3516778/python-using-two-variables-in-getattr">Python, using two variables in getattr?</a></p>
<p>请不要使用<code>list</code>作为变量名,因为它是内置的python对象</p>