1# creating a list for new column
2places = ['Nellore', 'Mumbai', 'Andhra']
3
4# we are using 'Places' as column name
5# adding the list to the dataframe as column
6dataframe['Places'] = places
1T = NP.random.randint(0, 10, 20).reshape(5, 4)
2c = NP.random.randint(0, 10, 5)
3r = NP.random.randint(0, 10, 4)
4# add a column to T, at the front:
5NP.insert(T, 0, c, axis=1)
6# add a column to T, at the end:
7NP.insert(T, 4, c, axis=1)
8# add a row to T between the first two rows:
9NP.insert(T, 2, r, axis=0)
10