擅长:python、mysql、java
<p>我认为你混淆了<code>eval</code>的用法。它用于运行保存在字符串中的代码。在您的示例中,python尝试将url作为代码运行,这显然不起作用。您将不需要<code>eval</code>。你知道吗</p>
<p>试试这个:</p>
<pre><code>advert_image_list = ['https://cache.willhaben.at/mmo/6/297/469/806_-1094197631.jpg', 'https://cache.willhaben.at/mmo/6/297/469/806_-455156804.jpg', 'https://cache.willhaben.at/mmo/6/297/469/806_466214286.jpg', 'https://cache.willhaben.at/mmo/6/297/469/806_1475201828.jpg']
advert_images = [('Image_1', advert_image_list[0]),
('Image_2', advert_image_list[1]),
('Image_3', advert_image_list[2]),
('Image_4', advert_image_list[3])]
adIm_DF = pd.DataFrame(advert_images).set_index(0).T
</code></pre>