This code makes a connection to hbase, and then prints the result of a given row. But the result is printed like this:
import happybase
connection = happybase.Connection('MacBook-Air.local')
table = connection.table('twitter_db')
row = table.row('2018-09-21 11:55:24')
print(row)
But the result is printed like this:
{'Hashtag:#AFDs': '1', 'Hashtag:#Job': '1', 'Hashtag:#pumpkinpoundcake': '1', 'Lang:und': '81', 'Lang:pt ': '17', 'Hashtag:#InsomniaInFourWords': '2', 'Hashtag:#thegreatindianbooktour': '1', 'Hashtag:#pdx911': '2', 'Hashtag:#US': '1', 'Lang:en ': '246', 'Lang:es ': '31', 'Hashtag:#travelling': '1', 'Hashtag:#prohibition': '1', 'Hashtag:#FF': '2', 'Lang:in ': '15'}
I would like to print on one side all the hashtags with their relative numbers in ascending order and by one or all the languages with their relative numbers in ascending order. For example:
'Hashtag:#FF': '2'
'Hashtag:#AFDs': '1'
'Hashtag:#Job': '1'
.........
----------------
'Lang:en ': '246'
'Lang:und': '81'
'Lang:es ': '31'
.......
For example I could create a method but how?