2016-08-05 34 views
-1

我需要将列从unicode转换为str。 我尝试熊猫:AttributeError:'str'对象没有属性'iloc'

f.edge(str(group['subdomain']).iloc[i], str(group['subdomain'].iloc[i+1]), 
      label=str(group['search_term'].iloc[i+1])) 

但它返回AttributeError: 'str' object has no attribute 'iloc' 我该如何解决呢?更远

str(group['subdomain']).iloc[i] 
#     ^

移动括号到右:

回答

1

您所访问的iloc属性之前铸造

str(group['subdomain'].iloc[i]) 
+0

你能帮助解决这个问题? '错误:边长208568.346597大于允许的最大值65535。 检查整个节点(s).' – ldevyataykina

+1

@ldevyataykina很难说没有回溯和相关代码的问题真的是什么。您可以考虑将此作为一个新问题。 –

相关问题