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
bin222
V2EX  ›  Python

Pandas 数据合并求助

  •  
  •   bin222 · Jul 27, 2018 · 1561 views
    This topic created in 2842 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   ·   Solana   ·   3820 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 05:01 · PVG 13:01 · LAX 22:01 · JFK 01:01
    ♥ Do have faith in what you're doing.