推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
sjmcefc2
V2EX  ›  Python

开发一个文本检查、清理脚本是不是有用?

  •  
  •   sjmcefc2 · Apr 25, 2018 · 1546 views
    This topic created in 3074 days ago, the information mentioned may be changed or developed.
    经常要导入大量的 UTF-8 文本到数据库,但是数据质量不高。有时候一行存在\会 load 报错,有时候部分字段会出现编码乱码,出现�����г��这种。
    想用 python 实现一个功能,
    一是想实现根据表结构、字段长度来扫描每一行数据是否符合表的要求;
    二是检查每一行数据的编码,如果发现有上述的乱码或者\,能够经过某种处理弄成正确编码(数据库可以接受的 utf8 编码)
    python 初学者,大牛们能不能指点一下这个轮子是不是已经有了?如果没有要是个什么思路呢?
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2728 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 03:15 · PVG 11:15 · LAX 20:15 · JFK 23:15
    ♥ Do have faith in what you're doing.