Liu6
V2EX  ›  问与答

pandas 怎么将数据大于某个值变成 1 小于某个值变成 0

  •  
  •   Liu6 · Oct 14, 2019 · 3213 views
    This topic created in 2423 days ago, the information mentioned may be changed or developed.
    数据中 有一列数据 是 0-1 之间的数据(例 0.1,0.01 ,0.9 ),想请问下 怎么将这列数据大于 0.5 的变成 0 小于 0.5 的变成 1 最后就是一列 0 或 1 的值???
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1491 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 93c8b4a0 · 34ms · UTC 16:58 · PVG 00:58 · LAX 09:58 · JFK 12:58
    ♥ Do have faith in what you're doing.