小编Car*_*a S的帖子

AttributeError:'Series'对象没有属性'items'

我正在尝试使用同事写的脚本.

这部分脚本工作正常:

xl = pd.ExcelFile(path + WQ_file)
sheet_names = xl.sheet_names

df = pd.read_excel(path + WQ_file, sheetname = 'Chemistry Output Table', skiprows = [0,1,2,4,5,6,7], 
               index_col = [0,1], na_values = ['', 'na', '-'])
df.index.names = ['Field_ID', 'Date_Time']

header = pd.read_excel(path + WQ_file, sheetname = 'header data',  
               index_col = [0], na_values = ['', 'na', ' - '])
header_dict = {ah: header['name_short'].loc[ah] for ah in header.index}

analytes_excel = pd.read_excel(path + WQ_file, sheetname = 'analytes', columns = 'name')
analytes_list = [item for sublist in analytes_excel.values.tolist() …
Run Code Online (Sandbox Code Playgroud)

python series attributeerror python-2.7 pandas

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

attributeerror ×1

pandas ×1

python ×1

python-2.7 ×1

series ×1