我正在尝试使用HappyBase在python中创建两个HBase表。每个表大约有2-3列。我写的代码如下:
import happybase as hb
conn = hb.Connection('localhost', table_prefix='MP3')
def create_table1():
powers = conn.create_table('powers')
column_powers = powers.put('0', {'f1': 'personal',
'f2': 'professional',
'f3': 'custom'})
return powers, column_powers
def create_table2():
food = conn.create_table('food')
column_food = food.put('0', {'f1': 'nutrition',
'f2': 'taste'})
return food, column_food
我试图在pycharm中运行它,但是happybase库无法安装。有人可以验证我的代码是否正确,并且对如何在pycharm中安装happybase有任何见解。