Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

element of an array is the same as any of the previous elements pandas

df['match'] = df.col1.eq(df.col1.shift())
print (df)
   col1  match
0     1  False
1     3  False
2     3   True
3     1  False
4     2  False
5     3  False
6     2  False
7     2   True
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #element #array #previous #elements #pandas
ADD COMMENT
Topic
Name
9+9 =