utf-8和utf-8-sig的区别(CSV文件乱码)

前言:python 在写入csv文件中,出现了乱码的问题。

解决:utf-8 改为utf-8-sig

区别如下:

1、“utf-8”是以字节为编码单元,它的字节顺序在所有系统中都是一样的,没有字节序问题,因此它不需要BOM,所以当用“utf-8”编码方式读取带有BOM的文件时,它会把BOM当做是文件内容来处理,也就会发生类似上边的错误。

2、“utf-8-sig”中sig全拼为 signature 也就是”带有签名的utf-8”,因此”utf-8-sig”读取带有BOM的“ utf-8″文件时会把BOM单独处理,与文本内容隔离开,也是我们期望的结果。

Excel 比较两列中的数据以查找重复数据

方法 1:使用工作表公式

查找A列的数据在C列中是否存在,并把存在的数据显示在B列
在单元格 B1 中键入以下公式
=IF(ISERROR(MATCH(A1,$C$1:$C$5,0)),””,A1)
向下填充即可。

MATCH函数:
https://baike.baidu.com/item/MATCH函数/6652123

Excel函数VLOOKUP+MATCH使用方法:https://jingyan.baidu.com/article/0f5fb0993c6d1d6d8334eaa5.html

excel函数之vlookup函数:实现多条件查找引用:
https://jingyan.baidu.com/article/ab69b2707003fd2ca7189f95.html

使用VLOOKUP函数查找前一列的值:
https://jingyan.baidu.com/article/48206aea8c9c7b216ad6b3c9.html

VLOOKUP+IF函数实现多条件查询:
https://jingyan.baidu.com/article/77b8dc7fb3a9c96175eab673.html

index函数和match函数实现多条件查找:
https://jingyan.baidu.com/article/495ba84107c25538b30ede34.html

vlookup,index+match,lookup,三个函数优劣势对比,告诉你怎么选:
http://www.360doc.com/content/19/0104/16/734868_806503063.shtml

方法 2:使用Visual Basic宏

  1. 启动 Excel。
  2. 按 Alt+F11 启动Visual Basic编辑器。
  3. 在”插入”菜单上,选择”模块”。
  4. 在模块工作表中输入以下代码:
Sub Find_Matches()
Dim CompareRange As Variant, x As Variant, y As Variant
' Set CompareRange equal to the range to which you will
' compare the selection.
Set CompareRange = Range("C1:C5")
' NOTE: If the compare range is located on another workbook
' or worksheet, use the following syntax.
' Set CompareRange = Workbooks("Book2"). _
' Worksheets("Sheet2").Range("C1:C5")
'
' Loop through each cell in the selection and compare it to
' each cell in CompareRange.
For Each x In Selection
For Each y In CompareRange
If x = y Then x.Offset(0, 1) = x
Next y
Next x
End Sub
  1. 按 Alt+F11 返回到Excel。
  2. 选择单元格 A1 到 A5。
  3. 在 Excel 2007 和更高版本的 Excel 中,选择”开发工具”选项卡,然后在”代码”组中选择”宏”。
  4. 单击Find_Matches,然后单击”运行”。

中兴F452光猫获取超管的方法

  1. 用光猫背后的普通用户密码登录后台
  2. 地址栏输入:http://192.168.1.1/common_page/File_Download_lua.lua?downtype=0&IF_FILEPATH=//userconfig/cfg/db_user_cfg.xml
  3. 把下载下来的文件后缀名改为xml,使用中兴配置文件解密工具进行解密。
  4. 将保存后的文件右键以记事本打开,搜索telecomadmin,密码就在下方(注意有两个telecomadmin)。

中兴配置文件解密.zip
链接: https://pan.baidu.com/s/1-GmlTh_fRkeYSCQhbnRejA
提取码: x2ma

破解 Excel 工作簿、工作表密码

  1. 修改文件的扩展名为.rar;
  2. 打开修改了扩展名的文件,编辑“/xl/workbook.xml”文件,去除“<workbookProtection …/>”整个标记,保存并更新文件;(清除工作簿密码)
  3. 编辑“/xl/worksheets/sheet1.xml”文件,去除“<sheetProtection …/>”整个标记,保存并更新文件;(清除工作表密码,哪个工作表加密就编辑哪个工作表)
  4. 保存文件,并将文件扩展名改回xlsx即可。

OpenMediaVault 安装 OMV-Extras

  1. 访问 https://site.ip138.com/,查询 raw.githubusercontent.com 的IP地址;
  2. 编辑 /etc/hosts 文件,添加一条记录:前面查询到的IP地址 raw.githubusercontent.com,比如:185.199.109.133 raw.githubusercontent.com
  3. 运行命令进行安装:wget -O – https://github.com/OpenMediaVault-Plugin-Developers/packages/raw/master/install | bash

vi 命令:
dd 删除整行
o 插入一行
q! 不保存退出

Free Web Hosting