推荐学习书目
› 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
hao1032
V2EX  ›  Python

Python 里面有处理文本表格的库吗?

  •  
  •   hao1032 · Apr 1, 2015 · 4555 views
    This topic created in 4239 days ago, the information mentioned may be changed or developed.
    如图,这个是我用 dumpsys meminfo com.tencent.mtt 输出的手机内存信息.我现在想要获取其中的某些值,比如红框定位的。
    python 有专门处理这种事情的库吗?

    8 replies  •  2015-04-02 10:18:56 +08:00
    staticor
    staticor
    Apr 1, 2015
    1
    pandas 可能做的比想要的多.
    ligyxy
    ligyxy
    Apr 1, 2015
    2
    先去掉顶部不是表格的内容,然后大概在pandas里设置好sep参数就行了吧
    hao1032
    hao1032
    OP
    Apr 1, 2015
    3
    @staticor 这个貌似是个大家伙,它还依赖一些库,依赖的库也不小。不适合我的需求。
    rrfeng
    rrfeng
    Apr 1, 2015
    4
    split 不就行了?
    FanAndXinran
    FanAndXinran
    Apr 1, 2015
    5
    split('\t') ?
    dofine
    dofine
    Apr 1, 2015 via iPhone
    6
    csv 行吗。
    9hills
    9hills
    Apr 1, 2015
    7
    这个不需要什么库吧,现写一个好了。
    hao1032
    hao1032
    OP
    Apr 2, 2015
    8
    @all 已经自己解析了。感谢大家
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   546 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 19:28 · PVG 03:28 · LAX 11:28 · JFK 14:28
    ♥ Do have faith in what you're doing.