擅长:python、mysql、java
<p>还可以使用<code>int()</code>方法将序列强制转换为int。你知道吗</p>
<p>但是,这只适用于单个值,如果有更多值,则需要将这些值返回到数组中,并通过索引值或通过迭代访问它们。你知道吗</p>
<p>对于上述问题,只需执行以下操作:</p>
<pre><code>number = int(df1.loc[:,'randomcolumn'])
print(number)
out: 12345
type(number)
out: int
</code></pre>