matches = ['some string1', 'some string2']
if (matches[0] in df.iloc[x, 12]) and (df.isnull().any(axis=1)):
#The code above第二次尝试和另一个错误: if (matches[0] in df.<e
我有一个450万行数据,我想做一个简单的计算,基本上是上一行的同一个KEY,如果它满足某些条件,它用入口[i]和[i-1]做a和,如果不满足,则跳过和。[i] = np.where((df_pivot['key_aux'].iloc[i]==df_pivot['key_aux'].iloc[i-1]) & (df_pivot['Month'].iloctrying to be set on a copy
我正在尝试将当前索引值与我的pandas数据框中下一个索引值进行比较。我可以使用iloc访问值,但是当我编写一个if条件来验证值时。它给了我一个错误。pd.DataFrame({'Col1': [2.5, 1.5, 3 , 3 ,4.8 , 4 ]})
for k in range(len(df)): trend.append('up')