擅长:python、mysql、java
<p>您已经获得了dict,因此只需搜索密钥</p>
<pre><code>x = {'id': b'abc', 'type': b'business', 'state': b'AZ', 'latitude': 33.3482589,
'name': b"ABC Restaurant", 'full_address': b'1835 E ABC Rd, Ste C109, Phoenix, AZ 85284',
'categories': [b'Restaurants', b'Buffets', b'Italian'],
'open': True, 'stars': 4, 'city': b'Phoenix', 'neighborhoods': [],
'__id': 0, 'review_count': 122, 'longitude': -111.9088346}
x['city']
#b'Phoenix'
</code></pre>
<p>这里<code>Phoenix</code>不是一个<code>str</code>对象,而是<code>byte</code>,所以如果您想将它作为字符串,可以使用<code>decode</code>来转换它</p>
<pre><code>x['city'].decode()
#'Phoenix'
</code></pre>
<p>或者在您的情况下:</p>
<pre><code>data.fetch(0)['city'].decode()
</code></pre>