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

2020-01-08 14:43:07 +08:00
 elsagong

我有如下的测试数据:

 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  

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

911 次点击
所在节点    程序员
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/636148

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX