知りたいのですが、xlrdの結果形式です。
コードを見る
>>> sh.cell_value(rowx=2, colx=1)
u'Adam Gilchrist xxxxxxxxxxxxxxxxxxxxx'
res.searchを実行してみると
>>> temp1=sh.cell_value(rowx=2, colx=1)
>>> x=re.search("Adam",'temp1')
>>> x.group()
Traceback (most recent call last):
File "<pyshell#58>", line 1, in <module>
x.group()
AttributeError: 'NoneType' object has no attribute 'group'
何も得られません。
- 最初に知りたいのですが、結果の「u」は何ですか。
- によって返される結果形式は何ですか
sh.cell_value
。整数、文字列などですか。 - それらに正規表現を実行できますか?