How do I reverse the rows in a column using pandas, as in I want to change the value of the last row, row 4 and switch it with row 0. so instead of row:0 equaling 1 it would equal to 10.
Code associated with the code down below:
import pandas as pd
data =pd.read_csv('input.csv')
#printing out a single column
set_val =data['sets']
set_val
sets dataset(row number, value) output:
0 1
1 2
2 3
3 4
4 10