49

Convert new array to dataframe #convert new array to dataframe df = pd . DataFrame ( board_array )

Rename columns, preview output #rename columns, check output df . columns = [ 'URL' , 'Name' , 'Age' , 'Year_Joined' , 'Title' ] df . head ( 10 ) URL Name Age Year_Joined Title 0 http://www.reuters.com/finance/stocks/company-... Eric Schmidt 61 2015 Executive Chairman of the Board of Director 1 http://www.reuters.com/finance/stocks/company-... Sergey Brin 43 2015 President, Director 2 http://www.reuters.com/finance/stocks/company-... Lawrence Page 44 2015 Chief Executive Officer, Director 3 http://www.reuters.com/finance/stocks/company-... Ruth Porat 59 2015 Chief Financial Officer, Senior Vice President 4 http://www.reuters.com/finance/stocks/company-... Sundar Pichai 45 2017 Director, Chief Executive Officer, Google Inc. 5 http://www.reuters.com/finance/stocks/company-... David Drummond 54 2015 Senior Vice President - Corporate Development,... 6 http://www.reuters.com/finance/stocks/company-... John Hennessy 64 2007 Lead Independent Director 7 http://www.reuters.com/finance/stocks/company-... Diane Greene 61 2015 Director 8 http://www.reuters.com/finance/stocks/company-... L. John Doerr 65 2016 Independent Director 9 http://www.reuters.com/finance/stocks/company-... Roger Ferguson 65 2016 Independent Director



Export data to CSV #export data df . to_csv ( '/Users/yourname/desktop/board_members.csv' )

That's it! If you're interested in seeing how I used this data check out my visualization on the interconnectedness of companies through shared board members here.

Interested in practicing for data scientist or analyst interviews?

We send 3 questions each week to thousands of data scientists and analysts preparing for interviews or just keeping their skills sharp. You can sign up to receive the questions for free on our home page.