我有一个名为“因子”的列,每次该列中的名称更改时,我想插入一个空白行,这可能吗?
for i in range(0, end):
if df2.at[i + 1, 'factor'] != df2.at[i, 'factor']:
Run Code Online (Sandbox Code Playgroud) 我有句列,对此我像这样分割
df['ColTest'] = df['ColTest'].str.lower().str.split()
Run Code Online (Sandbox Code Playgroud)
我所试图做的是通过在每个句子每个单词回路和应用autocorrect.spell()
for i in df['ColTest']:
for j in i:
df['ColTest'][i][j].replace(at.spell(j))
Run Code Online (Sandbox Code Playgroud)
这是扔了一个错误
AttributeError:“ float”对象没有属性“ replace”
autospell autospell
数据框的样子
ColTest
This is some test string
that might contain a finger
but this string might contain a toe
and this hass a spel error
Run Code Online (Sandbox Code Playgroud)
有在我的专栏没有数字...任何想法吗?