目的是读取栅格影像并进行一些计算处理,不明白什么会报这个错,请各位帮忙看下
代码最后一行(第30行)引用的两个对象是不同类型,不可以用“+”运算符进行运算。
请检查数据。
print(f"resultMap[(i+r),(j+c)] + value = {resultMap[(i+r)}, (j+c)] + value}")
chatroom_friends = getChatroomFriends(chatrooms, friend_overlap)
#% 置换username为名称
result_chatroom_friends = copy.deepcopy(chatroom_friends)
for k in result_chatroom_friends:
usernames = result_chatroom_friends[k]['friends']
result_chatroom_friends[k]['friends'] = ' | '.join(friend_overlap.loc[usernames]['RemarkName'].tolist())
result_chatroom_friends = pd.DataFrame(result_chatroom_friends).T
result_chatroom_friends = result_chatroom_friends[['total', 'num', 'friends']]
# 数据用完,处理friend_overlap
friend_overlap = getSameChatroomInfo(chatroom_friends, friend_overlap)