TypeError:不支持+:“float”和“unicode”的操作数类型

2024-09-30 04:35:37 发布

您现在位置:Python中文网/ 问答频道 /正文

目前,我正在尝试合并一个特定路径的域列表。当尝试将域与特定路径合并时,我收到错误。在

TypeError:不支持+:“float”和“unicode”的操作数类型

我正在阅读两个excel文档。代码如下:

import pandas as pd
import urllib


apps = pd.read_excel("test.xlsx", "Sheet1")
pdirs= pd.read_excel("dirs.xlsx", "Sheet1")

urls = apps['Domains'].values.tolist()
dirs = pdirs['DIR'].values.tolist() 

for websites in urls:
    for directory in dirs:
        testURL= websites + directory
        print (testURL)

网站的格式如下test.test.com网站目录变量的格式类似于/test。在

有什么想法吗?在


Tags: appstestimport路径forreadxlsxexcel

热门问题