Python:按列值生成文件名[关闭]

问题描述 投票:0回答:1

我有数千行的表。我需要创建一个函数,使得urls就像在picture列中一样。它需要npictures数字,网址和创建新的网址分开“|”。

| npictures |         url          |                                pictures                                |
|-----------|----------------------|------------------------------------------------------------------------|
|         2 | test.com/img/abc.jpg | test.com/img/abc.jpg | test.com/img/abc_2.jpg                          |
|         3 | test.com/img/def.jpg | test.com/img/def.jpg | test.com/img/def_2.jpg | test.com/img/def_3.jpg |
|         1 | test.com/img/ghi.jpg | test.com/img/ghi.jpg                                                                    

如果可以在Excel中制作或在python中创建一个函数。

python excel
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.