首页 🏢Excel

满意度明细新

data = pd.read_excel('坐席满意度明细.xlsx')#去除表头
data.columns=data.values[0]#第一行升级为标题
data=data.drop(index=[0])#去除第一行

data['满意度推送类型']=data['满意度推送类型'].replace("IVR(转满意度)","IVR")
data['满意度推送类型']=data['满意度推送类型'].replace("未推送(客户座机挂断)","未推送")
data['满意度推送类型']=data['满意度推送类型'].replace("短信","短信")
data['满意度推送类型']=data['满意度推送类型'].replace("IVR(转满意度)","IVR")

data['非常满意']=data['满意度评分'].replace("非常满意","1")
data['非常满意']=data['非常满意']=data['非常满意'].replace("未评分","")
data['非常满意']=data['非常满意']=data['非常满意'].replace("满意","")
data['非常满意']=data['非常满意']=data['非常满意'].replace("不满意","")

data['满意']=data['满意度评分'].replace("满意","1")
data['满意']=data['满意']=data['满意'].replace("未评分","")
data['满意']=data['满意']=data['满意'].replace("非常满意","")
data['满意']=data['满意']=data['满意'].replace("不满意","")

data['未评分']=data['满意度评分'].replace("未评分","1")
data['未评分']=data['未评分']=data['未评分'].replace("满意","")
data['未评分']=data['未评分']=data['未评分'].replace("非常满意","")
data['未评分']=data['未评分']=data['未评分'].replace("不满意","")

data['不满意']=data['满意度评分'].replace("不满意","1")
data['不满意']=data['不满意']=data['不满意'].replace("满意","")
data['不满意']=data['不满意']=data['不满意'].replace("非常满意","")
data['不满意']=data['不满意']=data['不满意'].replace("未评分","")

data['满意度评分']=data['满意度评分'].replace("非常满意","1")
data['满意度评分']=data['满意度评分'].replace("不满意","1")
data['满意度评分']=data['满意度评分'].replace("未评分","1")
data['满意度评分']=data['满意度评分'].replace("满意","1")

data.to_excel("坐席满意度明细1.xlsx",index=False)


文章评论