<p>您的示例没有显示单一的统一编码。我们可以推测两位数的数字是拉丁-1,但我猜测(也基于<a href="https://stackoverflow.com/questions/69423546/convert-and-translate-ambiguous-unicode-character-values-from-pandas-column">duplicate question</a>)真相确实比这更复杂</p>
<p>无论如何,至少对于一般方向,请尝试以下方法:</p>
<pre class="lang-py prettyprint-override"><code>import re
...
for index in range(len(data)):
data[index][1] = re.sub(
r'<U\+([0-9a-fA-F]{4})>',
lambda x: chr(int(x.group(1), 16)),
re.sub(
r'<([0-9a-fA-F]{2})>',
lambda x: chr(int(x.group(1), 16)),
data[index][1]))
</code></pre>
<p>演示:<a href="https://ideone.com/X60x3Q" rel="nofollow noreferrer">https://ideone.com/X60x3Q</a></p>
<p>可以避免重复使用lambda表达式,但代价是使用稍微复杂一点的正则表达式</p>
<pre class="lang-py prettyprint-override"><code>for index in range(len(data)):
data[index][1] = re.sub(
r'<(?:U\+)?((?<=\+)[0-9a-fA-F]{4}|(?<=<)[0-9a-fA-F]{2})>',
lambda x: chr(int(x.group(1), 16)),
data[index][1])
</code></pre>
<p>演示:<a href="https://ideone.com/SkuvAJ" rel="nofollow noreferrer">https://ideone.com/SkuvAJ</a></p>