V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · 4059 views
    This topic created in 4045 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
        1
    staticor  
       Apr 1, 2015
    pandas 可能做的比想要的多.
    ligyxy
        2
    ligyxy  
       Apr 1, 2015
    先去掉顶部不是表格的内容,然后大概在pandas里设置好sep参数就行了吧
    hao1032
        3
    hao1032  
    OP
       Apr 1, 2015
    @staticor 这个貌似是个大家伙,它还依赖一些库,依赖的库也不小。不适合我的需求。
    rrfeng
        4
    rrfeng  
       Apr 1, 2015
    split 不就行了?
    FanAndXinran
        5
    FanAndXinran  
       Apr 1, 2015
    split('\t') ?
    dofine
        6
    dofine  
       Apr 1, 2015 via iPhone
    csv 行吗。
    9hills
        7
    9hills  
       Apr 1, 2015
    这个不需要什么库吧,现写一个好了。
    hao1032
        8
    hao1032  
    OP
       Apr 2, 2015
    @all 已经自己解析了。感谢大家
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3483 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 12:05 · PVG 20:05 · LAX 05:05 · JFK 08:05
    ♥ Do have faith in what you're doing.