Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

dataframe shift python

df.shift(2, axis = 0) 
df.shift(-2, axis = 0) 
df['c1'] = df['c2'].shift(2, axis = 0) 
df['c1'] = df['c2'].shift(-2, axis = 0) 
 
PREVIOUS NEXT
Tagged: #dataframe #shift #python
ADD COMMENT
Topic
Name
9+5 =