擅长:python、mysql、java
<p>您可以使用<a href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.str.findall.html" rel="nofollow noreferrer">^{<cd3>}</a>按<code>SPD</code>每<code>4</code>个字符拆分字符串,然后使用<a href="https://stackoverflow.com/a/53218939/9698684">^{<cd4>}</a>从链接的解决方案中取消结果数据帧:</p>
<pre><code>sample1['SPD'] = sample1.SPD.str.ljust(4, '0').str.findall(r'.{4}?')
unnesting(sample1, ['SPD'])
SPD TST RCV TCU
1 0000 1535840000000 1535840000000 358272000000000
2 0000 1535840000000 1535850000000 358272000000000
2 0000 1535840000000 1535850000000 358272000000000
2 0000 1535840000000 1535850000000 358272000000000
2 0071 1535840000000 1535850000000 358272000000000
2 0000 1535840000000 1535850000000 358272000000000
2 007D 1535840000000 1535850000000 358272000000000
2 007C 1535840000000 1535850000000 358272000000000
2 00E2 1535840000000 1535850000000 358272000000000
</code></pre>