From dca5efd7f518c9d82d37c7b7955d5e317fc6de76 Mon Sep 17 00:00:00 2001 From: xieshen <1397910458@qq.com> Date: Sat, 5 Dec 2020 14:52:28 +0800 Subject: [PATCH] =?UTF-8?q?#=E9=A6=96=E9=A1=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update_newmedia.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 update_newmedia.py diff --git a/update_newmedia.py b/update_newmedia.py new file mode 100644 index 0000000..93d45b4 --- /dev/null +++ b/update_newmedia.py @@ -0,0 +1,18 @@ +#更新新媒体脚本,结果为有出入的新媒体列表。 +''' +1,将excel转为csv,使用utf-8编码集。 +2、获取csv内容 +3、与数据库中的数据逐项对比 +''' +import csv + + +def get_csv(path): + with open(path, encoding='utf-8') as csvfile: + reader = csv.reader(csvfile) + for r in reader: + + print(r) + +if __name__ == '__main__': + get_csv('D:/2020/新媒体监测/TASK_ALL.csv') \ No newline at end of file