1df = pd.DataFrame({'month': [1, 4, 7, 10],
2 'year': [2012, 2014, 2013, 2014],
3 'sale': [55, 40, 84, 31]})
4
5df.set_index('month')
1>>> df.set_index('month')
2 year sale
3month
41 2012 55
54 2014 40
67 2013 84
710 2014 31
8
1>>> df = df.set_index('Identifier')
2>>> df.head()
3 Place of Publication Date of Publication \
4206 London 1879 [1878]
5216 London; Virtue & Yorston 1868
6218 London 1869
7472 London 1851
8480 London 1857
9
10 Publisher \
11206 S. Tinsley & Co.
12216 Virtue & Co.
13218 Bradbury, Evans & Co.
14472 James Darling
15480 Wertheim & Macintosh
16
17 Title Author \
18206 Walter Forbes. [A novel.] By A. A A. A.
19216 All for Greed. [A novel. The dedication signed... A., A. A.
20218 Love the Avenger. By the author of “All for Gr... A., A. A.
21472 Welsh Sketches, chiefly ecclesiastical, to the... A., E. S.
22480 [The World in which I live, and my place in it... A., E. S.
23
24 Flickr URL
25206 http://www.flickr.com/photos/britishlibrary/ta...
26216 http://www.flickr.com/photos/britishlibrary/ta...
27218 http://www.flickr.com/photos/britishlibrary/ta...
28472 http://www.flickr.com/photos/britishlibrary/ta...
29480 http://www.flickr.com/photos/britishlibrary/ta...
30