import pandas as pd
# pandasのドキュメントから例を持ってきます。
url = 'http://www.fdic.gov/bank/individual/failed/banklist.html'
#pip install beautiful-soup
#pip install html5lib
# HTMLからデータを読み込み、tableをDataFrameにしてくれる。
dframe_list = pd.io.html.read_html(url)
# 最初のアイテムを取り出します。
dframe = dframe_list[0]
dframe
Bank Name | City | ST | CERT | Acquiring Institution | Closing Date | Updated Date | Loss Share Type | Agreement Terminated | Termination Date | |
---|---|---|---|---|---|---|---|---|---|---|
0 | Hometown National Bank | Longview | WA | 35156 | Twin City Bank | October 2, 2015 | October 15, 2015 | NaN | NaN | NaN |
1 | The Bank of Georgia | Peachtree City | GA | 35259 | Fidelity Bank | October 2, 2015 | October 15, 2015 | NaN | NaN | NaN |
2 | Premier Bank | Denver | CO | 34112 | United Fidelity Bank, fsb | July 10, 2015 | July 28, 2015 | none | NaN | NaN |
3 | Edgebrook Bank | Chicago | IL | 57772 | Republic Bank of Chicago | May 8, 2015 | July 23, 2015 | none | NaN | NaN |
4 | Doral BankEn Espanol | San Juan | PR | 32102 | Banco Popular de Puerto Rico | February 27, 2015 | May 13, 2015 | none | NaN | NaN |
5 | Capitol City Bank & Trust Company | Atlanta | GA | 33938 | First-Citizens Bank & Trust Company | February 13, 2015 | April 21, 2015 | none | NaN | NaN |
6 | Highland Community Bank | Chicago | IL | 20290 | United Fidelity Bank, fsb | January 23, 2015 | April 21, 2015 | none | NaN | NaN |
7 | First National Bank of Crestview | Crestview | FL | 17557 | First NBC Bank | January 16, 2015 | April 21, 2015 | none | NaN | NaN |
8 | Northern Star Bank | Mankato | MN | 34983 | BankVista | December 19, 2014 | March 26, 2015 | none | NaN | NaN |
9 | Frontier Bank, FSB D/B/A El Paseo Bank | Palm Desert | CA | 34738 | Bank of Southern California, N.A. | November 7, 2014 | March 26, 2015 | none | NaN | NaN |
10 | The National Republic Bank of Chicago | Chicago | IL | 916 | State Bank of Texas | October 24, 2014 | March 26, 2015 | none | NaN | NaN |
11 | NBRS Financial | Rising Sun | MD | 4862 | Howard Bank | October 17, 2014 | March 26, 2015 | none | NaN | NaN |
12 | GreenChoice Bank, fsb | Chicago | IL | 28462 | Providence Bank, LLC | July 25, 2014 | July 28, 2015 | none | NaN | NaN |
13 | Eastside Commercial Bank | Conyers | GA | 58125 | Community & Southern Bank | July 18, 2014 | July 28, 2015 | none | NaN | NaN |
14 | The Freedom State Bank | Freedom | OK | 12483 | Alva State Bank & Trust Company | June 27, 2014 | July 18, 2014 | none | NaN | NaN |
15 | Valley Bank | Fort Lauderdale | FL | 21793 | Landmark Bank, National Association | June 20, 2014 | June 29, 2015 | none | NaN | NaN |
16 | Valley Bank | Moline | IL | 10450 | Great Southern Bank | June 20, 2014 | June 26, 2015 | none | NaN | NaN |
17 | Slavie Federal Savings Bank | Bel Air | MD | 32368 | Bay Bank, FSB | May 30, 2014 | June 15, 2015 | none | NaN | NaN |
18 | Columbia Savings Bank | Cincinnati | OH | 32284 | United Fidelity Bank, fsb | May 23, 2014 | May 28, 2015 | none | NaN | NaN |
19 | AztecAmerica Bank En Espanol | Berwyn | IL | 57866 | Republic Bank of Chicago | May 16, 2014 | July 18, 2014 | none | NaN | NaN |
20 | Allendale County Bank | Fairfax | SC | 15062 | Palmetto State Bank | April 25, 2014 | July 18, 2014 | none | NaN | NaN |
21 | Vantage Point Bank | Horsham | PA | 58531 | First Choice Bank | February 28, 2014 | March 3, 2015 | none | NaN | NaN |
22 | Millennium Bank, National Association | Sterling | VA | 35096 | WashingtonFirst Bank | February 28, 2014 | March 03, 2015 | none | NaN | NaN |
23 | Syringa Bank | Boise | ID | 34296 | Sunwest Bank | January 31, 2014 | February 19, 2015 | none | NaN | NaN |
24 | The Bank of Union | El Reno | OK | 17967 | BancFirst | January 24, 2014 | February 19, 2015 | none | NaN | NaN |
25 | DuPage National Bank | West Chicago | IL | 5732 | Republic Bank of Chicago | January 17, 2014 | February 19, 2015 | none | NaN | NaN |
26 | Texas Community Bank, National Association | The Woodlands | TX | 57431 | Spirit of Texas Bank, SSB | December 13, 2013 | December 29, 2014 | none | NaN | NaN |
27 | Bank of Jackson County | Graceville | FL | 14794 | First Federal Bank of Florida | October 30, 2013 | November 05, 2014 | none | NaN | NaN |
28 | First National Bank also operating as The Nat... | Edinburg | TX | 14318 | PlainsCapital Bank | September 13, 2013 | May 27, 2015 | SFR/NSF | NaN | NaN |
29 | The Community's Bank | Bridgeport | CT | 57041 | No Acquirer | September 13, 2013 | December 20, 2013 | none | NaN | NaN |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
512 | ANB Financial, NA | Bentonville | AR | 33901 | Pulaski Bank and Trust Company | May 9, 2008 | August 28, 2012 | none | NaN | NaN |
513 | Hume Bank | Hume | MO | 1971 | Security Bank | March 7, 2008 | August 28, 2012 | none | NaN | NaN |
514 | Douglass National Bank | Kansas City | MO | 24660 | Liberty Bank and Trust Company | January 25, 2008 | October 26, 2012 | none | NaN | NaN |
515 | Miami Valley Bank | Lakeview | OH | 16848 | The Citizens Banking Company | October 4, 2007 | August 28, 2012 | none | NaN | NaN |
516 | NetBank | Alpharetta | GA | 32575 | ING DIRECT | September 28, 2007 | August 28, 2012 | none | NaN | NaN |
517 | Metropolitan Savings Bank | Pittsburgh | PA | 35353 | Allegheny Valley Bank of Pittsburgh | February 2, 2007 | October 27, 2010 | none | NaN | NaN |
518 | Bank of Ephraim | Ephraim | UT | 1249 | Far West Bank | June 25, 2004 | April 9, 2008 | none | NaN | NaN |
519 | Reliance Bank | White Plains | NY | 26778 | Union State Bank | March 19, 2004 | April 9, 2008 | none | NaN | NaN |
520 | Guaranty National Bank of Tallahassee | Tallahassee | FL | 26838 | Hancock Bank of Florida | March 12, 2004 | June 5, 2012 | none | NaN | NaN |
521 | Dollar Savings Bank | Newark | NJ | 31330 | No Acquirer | February 14, 2004 | April 9, 2008 | none | NaN | NaN |
522 | Pulaski Savings Bank | Philadelphia | PA | 27203 | Earthstar Bank | November 14, 2003 | July 22, 2005 | none | NaN | NaN |
523 | First National Bank of Blanchardville | Blanchardville | WI | 11639 | The Park Bank | May 9, 2003 | June 5, 2012 | none | NaN | NaN |
524 | Southern Pacific Bank | Torrance | CA | 27094 | Beal Bank | February 7, 2003 | October 20, 2008 | none | NaN | NaN |
525 | Farmers Bank of Cheneyville | Cheneyville | LA | 16445 | Sabine State Bank & Trust | December 17, 2002 | October 20, 2004 | none | NaN | NaN |
526 | Bank of Alamo | Alamo | TN | 9961 | No Acquirer | November 8, 2002 | March 18, 2005 | none | NaN | NaN |
527 | AmTrade International BankEn Espanol | Atlanta | GA | 33784 | No Acquirer | September 30, 2002 | September 11, 2006 | none | NaN | NaN |
528 | Universal Federal Savings Bank | Chicago | IL | 29355 | Chicago Community Bank | June 27, 2002 | April 9, 2008 | none | NaN | NaN |
529 | Connecticut Bank of Commerce | Stamford | CT | 19183 | Hudson United Bank | June 26, 2002 | February 14, 2012 | none | NaN | NaN |
530 | New Century Bank | Shelby Township | MI | 34979 | No Acquirer | March 28, 2002 | March 18, 2005 | none | NaN | NaN |
531 | Net 1st National Bank | Boca Raton | FL | 26652 | Bank Leumi USA | March 1, 2002 | April 9, 2008 | none | NaN | NaN |
532 | NextBank, NA | Phoenix | AZ | 22314 | No Acquirer | February 7, 2002 | February 5, 2015 | none | NaN | NaN |
533 | Oakwood Deposit Bank Co. | Oakwood | OH | 8966 | The State Bank & Trust Company | February 1, 2002 | October 25, 2012 | none | NaN | NaN |
534 | Bank of Sierra Blanca | Sierra Blanca | TX | 22002 | The Security State Bank of Pecos | January 18, 2002 | November 6, 2003 | none | NaN | NaN |
535 | Hamilton Bank, NAEn Espanol | Miami | FL | 24382 | Israel Discount Bank of New York | January 11, 2002 | September 21, 2015 | none | NaN | NaN |
536 | Sinclair National Bank | Gravette | AR | 34248 | Delta Trust & Bank | September 7, 2001 | February 10, 2004 | none | NaN | NaN |
537 | Superior Bank, FSB | Hinsdale | IL | 32646 | Superior Federal, FSB | July 27, 2001 | August 19, 2014 | none | NaN | NaN |
538 | Malta National Bank | Malta | OH | 6629 | North Valley Bank | May 3, 2001 | November 18, 2002 | none | NaN | NaN |
539 | First Alliance Bank & Trust Co. | Manchester | NH | 34264 | Southern New Hampshire Bank & Trust | February 2, 2001 | February 18, 2003 | none | NaN | NaN |
540 | National State Bank of Metropolis | Metropolis | IL | 3815 | Banterra Bank of Marion | December 14, 2000 | March 17, 2005 | none | NaN | NaN |
541 | Bank of Honolulu | Honolulu | HI | 21029 | Bank of the Orient | October 13, 2000 | March 17, 2005 | none | NaN | NaN |
542 rows × 10 columns
# 列名を取り出せます。
dframe.columns.values
array(['Bank Name', 'City', 'ST', 'CERT', 'Acquiring Institution', 'Closing Date', 'Updated Date', 'Loss Share Type', 'Agreement Terminated', 'Termination Date'], dtype=object)