V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
elsagong
V2EX  ›  程序员

Hbase 中如何不插入空值-Pandas Python

  •  
  •   elsagong · Jan 8, 2020 · 1184 views
    This topic created in 2302 days ago, the information mentioned may be changed or developed.

    我有如下的测试数据:

     test_a      test_b   test_c   test_d   test_date
        -------------------------------------------------
    1   a           500      0.1      111      20191101
    2   a           NaN      0.2      NaN      20191102
    3   a           200      0.1      111      20191103
    4   a           400      NaN      222      20191104
    5   a           NaN      0.2      333      20191105
    

    我现在导入的数据中有空字符串,在 pandas 中,对空值做了处理 df = df.fillna('')

    COLUMN                           CELL                                             
     test:test_a                      timestamp=1578389750838, value=a                  
     test:test_b                      timestamp=1578389788675, value=                   
     test:test_c                      timestamp=1578389775471, value=0.2                
     test:test_d                      timestamp=1578449081388, value=
    

    如何让它在 Hbase 查询 get 'test', 'a201911012'后是如下结果:

    COLUMN                           CELL                                              
     test:test_a                      timestamp=1578389750838, value=a                  
     test:test_c                      timestamp=1578389775471, value=0.2  
    

    感谢大神给到的任何建议!!

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5575 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 07:05 · PVG 15:05 · LAX 00:05 · JFK 03:05
    ♥ Do have faith in what you're doing.