Bigtable python 客户端:如何检索大于给定值的最小行键
Bigtable python Client: How do I retrieve the smallest rowkey that is greater than a given value
我想检索对应于大于给定 value
的最小 rowkey
的行。
如何在 Python 中实现 Golang 客户端中存在的 prefixSuccessor 功能?
这是您要找的吗?您需要先调整和测试此代码。
def prefixSuccessor(text, num):
# sort the text list
text.sort(reverse=True)
output = ""
# loop through the list
for i in range(num):
output += text[i]
return output
if __name__ == "__main__":
# list of words
text = ["ahty", "ghf", "hfy", "hfgt"]
# find the length
num = len(text)
# print output
print(prefixSuccessor(text, num))
我想检索对应于大于给定 value
的最小 rowkey
的行。
如何在 Python 中实现 Golang 客户端中存在的 prefixSuccessor 功能?
这是您要找的吗?您需要先调整和测试此代码。
def prefixSuccessor(text, num):
# sort the text list
text.sort(reverse=True)
output = ""
# loop through the list
for i in range(num):
output += text[i]
return output
if __name__ == "__main__":
# list of words
text = ["ahty", "ghf", "hfy", "hfgt"]
# find the length
num = len(text)
# print output
print(prefixSuccessor(text, num))