V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2015-04-01 12:36:38 +08:00 · 3183 次点击
    这是一个创建于 3312 天前的主题,其中的信息可能已经有所发展或是发生改变。
    如图,这个是我用 dumpsys meminfo com.tencent.mtt 输出的手机内存信息.我现在想要获取其中的某些值,比如红框定位的。
    python 有专门处理这种事情的库吗?

    8 条回复    2015-04-02 10:18:56 +08:00
    staticor
        1
    staticor  
       2015-04-01 12:43:38 +08:00
    pandas 可能做的比想要的多.
    ligyxy
        2
    ligyxy  
       2015-04-01 13:12:47 +08:00
    先去掉顶部不是表格的内容,然后大概在pandas里设置好sep参数就行了吧
    hao1032
        3
    hao1032  
    OP
       2015-04-01 13:14:56 +08:00
    @staticor 这个貌似是个大家伙,它还依赖一些库,依赖的库也不小。不适合我的需求。
    rrfeng
        4
    rrfeng  
       2015-04-01 13:18:43 +08:00
    split 不就行了?
    FanAndXinran
        5
    FanAndXinran  
       2015-04-01 13:37:27 +08:00
    split('\t') ?
    dofine
        6
    dofine  
       2015-04-01 13:46:31 +08:00 via iPhone
    csv 行吗。
    9hills
        7
    9hills  
       2015-04-01 13:56:15 +08:00
    这个不需要什么库吧,现写一个好了。
    hao1032
        8
    hao1032  
    OP
       2015-04-02 10:18:56 +08:00
    @all 已经自己解析了。感谢大家
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5888 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 06:19 · PVG 14:19 · LAX 23:19 · JFK 02:19
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.