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

Pandas 数据合并求助

  •  
  •   bin222 · Jul 27, 2018 · 1877 views
    This topic created in 2990 days ago, the information mentioned may be changed or developed.

    有这样两个表: 表 A: Y type 0 a 1 a 1 a 1 a 1 a 0 b 0 b 1 b 1 b 1 b 0 c 0 c

    表 B: type r a 0.1 b 0.2 c 0.3


    如何将 A 表中的 Type 替换成 B 表中的 r,注意是替换噢!!! 举个栗子,A 第一行: 0 a,由于 B 表中 a=0.1,所以应该变成: Y type 0 0.1 1 0.1 1 0.1 ...

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2239 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 06:45 · PVG 14:45 · LAX 23:45 · JFK 02:45
    ♥ Do have faith in what you're doing.