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) 

Here is what the above code is Doing:
1. The shift(2) function shifts the dataframe by 2 rows.
2. The shift(-2) function shifts the dataframe by -2 rows.
3. The shift(2, axis = 0) function shifts the dataframe by 2 rows.
4. The shift(-2, axis = 0) function shifts the dataframe by -2 rows.
5. The shift(2, axis = 1) function shifts the dataframe by 2 columns.
6. The shift(-2, axis = 1) function shifts the dataframe by -2 columns.
7. The shift(2, axis = ‘columns’) function shifts the dataframe by 2 columns.
8. The shift(-2, axis = ‘columns’) function shifts the dataframe by -2 columns.
9. The shift(2, axis = ‘rows’) function shifts the dataframe by 2 rows.
10. The shift(-2, axis = ‘rows’) function shifts the dataframe by -2 rows.
11. The shift(2, axis = ‘index’) function shifts the dataframe by 2 rows.
12. The shift(-2, axis = ‘index’) function shifts the dataframe by -2 rows.
13. The shift(2, axis = ‘columns’) function shifts the dataframe by 2 columns.
14. The shift(-2, axis = ‘columns’) function shifts the dataframe by -2 columns.
15. The shift(2, axis = ‘rows’) function shifts the dataframe by 2 rows.
16. The shift(-2, axis = ‘rows’) function shifts the dataframe by -2 rows.
17. The shift(2, axis = ‘index’) function shifts the dataframe by 2 rows.
18. The shift(-2, axis = ‘index’) function shifts the dataframe by -2 rows.