Brief Intro to Pandas

This week we'll learn a little bit about pandas. In particular, we'll see some of the ways that it does things we've gotten used to implementing ourselves, and we'll learn about its groupby and indexing operations.

Pandas is one of the most popular libraries in Python, and there is no shortage of tutorials and examples out there. This example is not meant to replace those, but instead to provide an introduction that touches upon examples we've used in the past.


In [1]:
import numpy as np
import pandas as pd

By convention, pandas is imported as pd. We'll now use its built in CSV reader to read in data we've


In [2]:
df = pd.read_csv("/srv/nbgrader/data/Building_Inventory.csv")

In [3]:
df.columns


Out[3]:
Index(['Agency Name', 'Location Name', 'Address', 'City', 'Zip code', 'County',
       'Congress Dist', 'Congressional Full Name', 'Rep Dist', 'Rep Full Name',
       'Senate Dist', 'Senator Full Name', 'Bldg Status', 'Year Acquired',
       'Year Constructed', 'Square Footage', 'Total Floors',
       'Floors Above Grade', 'Floors Below Grade', 'Usage Description',
       'Usage Description 2', 'Usage Description 3'],
      dtype='object')

In [4]:
df


Out[4]:
Agency Name Location Name Address City Zip code County Congress Dist Congressional Full Name Rep Dist Rep Full Name ... Bldg Status Year Acquired Year Constructed Square Footage Total Floors Floors Above Grade Floors Below Grade Usage Description Usage Description 2 Usage Description 3
0 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 1975 1975 144 1 1 0 Unusual Unusual Not provided
1 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
2 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
3 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
4 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
5 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
6 Department of Natural Resources Dixon Springs State Park - Pope County Rr #2 Golconda 62938 Pope 15 John Shimkus 118 Phelps Brandon W. ... In Use 2000 2000 120 1 1 0 Unusual Unusual Not provided
7 Department of Natural Resources Dixon Springs State Park - Pope County Rr #2 Golconda 62938 Pope 15 John Shimkus 118 Phelps Brandon W. ... In Use 2000 2000 120 1 1 0 Unusual Unusual Not provided
8 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
9 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
10 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
11 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
12 Department of Natural Resources Eldon Hazlet State Park - Clinton County Keyesport Road Carlyle 62231 Clinton 15 John Shimkus 107 Cavaletto John D. ... In Use 1999 1999 96 1 1 0 Storage Storage Not provided
13 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 1980 1980 625 1 1 0 Assembly Assembly Not provided
14 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
15 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
16 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 1997 1997 740 1 1 0 Assembly Assembly Not provided
17 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 320 1 1 0 Assembly Assembly Not provided
18 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
19 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 1976 1976 625 1 1 0 Assembly Assembly Not provided
20 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
21 Department of Natural Resources Wolf Creek State Park R.r. 1 Box 99 Windsor 62534 Shelby 15 John Shimkus 102 Brown Adam ... In Use 1980 1980 144 1 1 0 Storage Storage Not provided
22 Department of Natural Resources Wolf Creek State Park R.r. 1 Box 99 Windsor 62534 Shelby 15 John Shimkus 102 Brown Adam ... In Use 1994 1994 2000 1 1 0 Storage Storage Not provided
23 Department of Corrections Dwight Correctional Center - Livingston County Route 17 West Dwight 60420 Livingston 16 Adam Kinzinger 90 Demmer Tom ... In Use 2001 2001 2048 1 1 0 Industrial Industrial Not provided
24 Department of Human Services Joliet Sexually Violent Persons Facility 1125 North Collins Street Joliet 60432 Will 11 Bill Foster 86 Walsh, Jr. Lawrence M. ... In Use 2001 2001 22000 2 2 0 Health Care Detention & Correc Not provided
25 Department of Corrections Southwestern Correctional Center - E. St. Louis 950 Kingshighway P.o. Box 50 East St Louis 62203 St. Clair 12 Mike Bost 113 Hoffman Jay ... In Use 2000 2000 120 1 1 0 Storage Storage Not provided
26 Department of Transportation Fithian Maintenance Storage Facility - Vermili... 1518 East 1800 North Road Fithian 61844 Vermilion 15 John Shimkus 104 Hays Chad ... In Use 2000 2000 4860 1 1 0 Storage Storage Not provided
27 Department of State Police Effingham District 12 - Effingham County 2 Miles East Of Mason Effingham 62454 Effingham 15 John Shimkus 107 Cavaletto John D. ... In Use 2000 2000 156 1 1 0 Industrial Industrial Not provided
28 Department of Military Affairs Marseilles Armory (Training Area) - LaSalle Co. 2515 N. 23rd. Road Marseilles 61341 LaSalle 16 Adam Kinzinger 75 Anthony John D. ... In Use 2000 2000 1080 1 1 0 Unusual Unusual Not provided
29 Department of Agriculture DuQuoin State Fairgrounds - Perry County Route #2, Box 306 Duquoin 62832 Perry 12 Mike Bost 115 Bryant Terri ... In Use 2000 2000 2020 1 1 0 Storage Storage Not provided
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
8819 Western Illinois University Western Illinois University - Macomb 904 W. Murray Street Macomb 61455 McDonough 18 Darin M. LaHood 93 Hammond Norine ... In Use 2007 2007 9732 1 0 0 Assembly NaN NaN
8820 Western Illinois University Western Illinois University - Macomb 900 W. University Drive Macomb 61455 McDonough 18 Darin M. LaHood 93 Hammond Norine ... In Use 1999 1999 185 1 0 0 Assembly NaN NaN
8821 Department of Military Affairs Rantoul Military Affairs 204 West Borman Drive Rantoul 61866 Champaign 15 John Shimkus 104 Hays Chad ... In Progress 2015 2015 25335 2 0 0 Assembly Storage NaN
8822 Department of Military Affairs Rantoul Military Affairs 204 West Borman Drive Rantoul 61866 Champaign 15 John Shimkus 104 Hays Chad ... In Progress 2015 2015 17512 2 0 0 Education Business NaN
8823 Department of Military Affairs Rantoul Military Affairs 204 West Borman Drive Rantoul 61866 Champaign 15 John Shimkus 104 Hays Chad ... In Progress 2015 2015 88657 4 0 0 Residential Business NaN
8824 Department of Transportation Frankfort USE THIS NUMBER FOR THE NEXT NEW BUILDING # AT... SPRINGFIELD 62703 Will 1 Bobby L. Rush 80 DeLuca Anthony ... In Progress 0 0 0 0 0 0 Not provided NaN NaN
8825 Department of Transportation Monmouth Traffic Operations - Warren County 710 180th Ave., Route 4, Box 6A Monmouth 61462 Warren 17 Cheri Bustos 94 Frese Randy ... In Progress 2016 2016 3600 1 0 0 Storage Storage NaN
8826 Department of Corrections Jacksonville Correctional Center - Morgan County 2268 East Morton Avenue Jacksonville 62650 Morgan 18 Darin M. LaHood 100 Davidsmeyer C. D. ... In Use 2015 2015 384 1 0 0 Not provided Storage NaN
8827 Department of Transportation Fap310 Rte 111-Mitchell 5987 State Route 111 Edwardsville 62025 Madison 17 Cheri Bustos 72 Verschoore Patrick ... In Progress 2015 2015 6110 1 0 0 Storage Storage NaN
8828 Department of Transportation Robinson Maintenance Yard - Crawford County 13125  East 1050th Avenue Robinson 62454 Crawford 15 John Shimkus 110 Phillips Reginald ... In Progress 2015 2015 2464 1 0 0 Storage NaN NaN
8829 Department of Transportation Olney Maintenance Storage Facility - Richland ... 3964 North Gentry Road Olney 62450 Richland 15 John Shimkus 109 Reis David ... In Progress 2016 2016 2464 1 0 0 Storage NaN NaN
8830 Department of Transportation Charleston Maintenance Yard 369 West Coolidge Charleston 61930 Coles 15 John Shimkus 110 Phillips Reginald ... In Progress 2016 2016 2464 1 0 0 Storage NaN NaN
8831 Department of Transportation Vandalia Maintenance Facility - Fayette County 910 Imco Drive Vandalia 61247 Fayette 15 John Shimkus 107 Cavaletto John D. ... In Progress 2016 2016 3105 1 0 0 Storage NaN NaN
8832 Department of Transportation Olney Maintenance Storage Facility - Richland ... 3964 N. Gentry Road Olney 62450 Richland 15 John Shimkus 109 Reis David ... In Use 0 0 1080 1 0 0 Storage Storage NaN
8833 Department of Transportation Pierron Maintenance Facility 13701 Schuster Road Pierron 62273 Madison 15 John Shimkus 108 Meier Charles E. ... In Progress 0 2016 4368 1 0 0 Utiility & Miscellan Storage NaN
8834 Department of Military Affairs Peoria Army Aviation Support Facility 12.0 Peoria 62702 Peoria 17 Cheri Bustos 92 Gordon-Booth Jehan A. ... Abandon 0 1941 2600 1 0 0 Storage Storage NaN
8835 Department of Military Affairs Peoria Army Aviation Support Facility 2323 South Airport Road Peoria 61607 Peoria 17 Cheri Bustos 92 Gordon-Booth Jehan A. ... Abandon 0 0 2600 1 0 0 Storage Storage NaN
8836 Department of Military Affairs Sparta Armory - Randolph County 1803 North Hill Crest Dr Sparta 62286 Randolph 12 Mike Bost 116 Costello, II Jerry F. ... In Progress 0 0 0 1 0 0 Utiility & Miscellan NaN NaN
8837 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 1980 1980 768 1 0 0 Storage Utiility & Miscellan NaN
8838 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 1998 1998 440 1 0 0 Storage Utiility & Miscellan NaN
8839 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 2000 2000 24 1 0 0 Utiility & Miscellan Utiility & Miscellan NaN
8840 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 2001 2001 180 1 0 0 Assembly Storage NaN
8841 Department of Military Affairs Peoria Army Aviation Support Facility 2323 S. Airport Rd Peoria 61607 Peoria 17 Cheri Bustos 92 Gordon-Booth Jehan A. ... In Progress 0 2017 288 1 0 0 Utiility & Miscellan Utiility & Miscellan NaN
8842 Department of Transportation Ashkum Team Section Headquarters Route 2, Box 2016 Ashkum 60911 Iroquois 16 Adam Kinzinger 106 Bennett Thomas ... In Use 2006 2006 1024 1 0 0 Utiility & Miscellan Storage NaN
8843 Department of Transportation Galena Maintenance Storage Facility 5988 High Ridge Road Galena 61036 Jo Daviess 17 Cheri Bustos 89 Stewart Brian W. ... In Progress 0 2017 2923 1 0 0 Storage Storage NaN
8844 Department of Transportation Monmouth Traffic Operations - Warren County 710 180th Avenue Monmouth 61462 Warren 17 Cheri Bustos 94 Frese Randy ... In Use 2015 2015 805 1 0 0 Storage Utiility & Miscellan NaN
8845 Department of Transportation Monmouth Traffic Operations - Warren County 710 180th Avenue Monmouth 61462 Warren 17 Cheri Bustos 94 Frese Randy ... In Use 1995 1995 2030 1 0 0 Storage Utiility & Miscellan NaN
8846 Department of Transportation Bult Field 28261 S. Kedzie Ave. Monee 60449 Will 2 Robin Kelly 79 Cloonen Katherine ... In Use 2014 2006 13387 1 0 0 Utiility & Miscellan NaN NaN
8847 Department of Transportation Elgin Maint. Bldg. (Rt. 19/Shales)  - Kane County 525 Shale Parkway Elgin 60120 Kane 8 Tammy Duckworth 43 Moeller Anna ... In Use 2016 2016 3793 1 0 0 Storage Storage NaN
8848 Department of Transportation Alsip Maintenance Yard - Cook County 11801 S. Ridgeland Avenue Worth 60482 Cook 1 Bobby L. Rush 35 Hurley Frances Ann ... In Use 2016 2016 3793 1 0 0 Storage Storage NaN

8849 rows × 22 columns


In [5]:
df.dtypes


Out[5]:
Agency Name                object
Location Name              object
Address                    object
City                       object
Zip code                    int64
County                     object
Congress Dist               int64
Congressional Full Name    object
Rep Dist                    int64
Rep Full Name              object
Senate Dist                 int64
Senator Full Name          object
Bldg Status                object
Year Acquired               int64
Year Constructed            int64
Square Footage              int64
Total Floors                int64
Floors Above Grade          int64
Floors Below Grade          int64
Usage Description          object
Usage Description 2        object
Usage Description 3        object
dtype: object

In [6]:
df.describe()


Out[6]:
Zip code Congress Dist Rep Dist Senate Dist Year Acquired Year Constructed Square Footage Total Floors Floors Above Grade Floors Below Grade
count 8849.000000 8849.000000 8849.000000 8849.000000 8849.000000 8849.000000 8.849000e+03 8849.000000 8849.000000 8849.000000
mean 61819.588315 13.332128 92.222059 46.368742 1919.027348 1911.452594 1.149795e+04 1.641880 1.458583 0.163182
std 1096.101975 4.142016 23.660796 11.829302 320.213274 336.453172 3.819806e+04 1.541914 1.286188 0.394120
min 1235.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000e+00 0.000000 0.000000 0.000000
25% 61105.000000 12.000000 79.000000 40.000000 1957.000000 1953.000000 2.390000e+02 1.000000 1.000000 0.000000
50% 62002.000000 14.000000 97.000000 49.000000 1975.000000 1974.000000 1.634000e+03 1.000000 1.000000 0.000000
75% 62650.000000 16.000000 110.000000 55.000000 1992.000000 1991.000000 6.462000e+03 2.000000 1.000000 0.000000
max 68297.000000 18.000000 119.000000 60.000000 2016.000000 2017.000000 1.200000e+06 31.000000 30.000000 4.000000

In [13]:
df.iloc[10]["County"]


Out[13]:
'LaSalle'

In [14]:
df.loc[10, ["County", "Senate Dist"]]


Out[14]:
County         LaSalle
Senate Dist         38
Name: 10, dtype: object

In [18]:
df2 = df.iloc[[10, 11, 599, 1000], [0, 1, 6]]
df2


Out[18]:
Agency Name Location Name Congress Dist
10 Department of Natural Resources Matthiessen State Park - LaSalle County 16
11 Department of Natural Resources Matthiessen State Park - LaSalle County 16
599 Department of Natural Resources Des Plaines State F&WA - Will County 16
1000 Department of Natural Resources World Shooting & Recreational Complex-Sparta 12

In [21]:
df2.loc[10]


Out[21]:
Agency Name              Department of Natural Resources
Location Name    Matthiessen State Park - LaSalle County
Congress Dist                                         16
Name: 10, dtype: object

In [23]:
df2.index.name = "Original Row"

In [24]:
df2


Out[24]:
Agency Name Location Name Congress Dist
Original Row
10 Department of Natural Resources Matthiessen State Park - LaSalle County 16
11 Department of Natural Resources Matthiessen State Park - LaSalle County 16
599 Department of Natural Resources Des Plaines State F&WA - Will County 16
1000 Department of Natural Resources World Shooting & Recreational Complex-Sparta 12

In [30]:
df2["Agency Name"].name = "Other"

In [31]:
df2


Out[31]:
Agency Name Location Name Congress Dist
Original Row
10 Department of Natural Resources Matthiessen State Park - LaSalle County 16
11 Department of Natural Resources Matthiessen State Park - LaSalle County 16
599 Department of Natural Resources Des Plaines State F&WA - Will County 16
1000 Department of Natural Resources World Shooting & Recreational Complex-Sparta 12

In [32]:
df2["Other"] = df2["Agency Name"]
del df2["Agency Name"]

In [33]:
df2


Out[33]:
Location Name Congress Dist Other
Original Row
10 Matthiessen State Park - LaSalle County 16 Department of Natural Resources
11 Matthiessen State Park - LaSalle County 16 Department of Natural Resources
599 Des Plaines State F&WA - Will County 16 Department of Natural Resources
1000 World Shooting & Recreational Complex-Sparta 12 Department of Natural Resources

In [34]:
df2.iloc[0]


Out[34]:
Location Name    Matthiessen State Park - LaSalle County
Congress Dist                                         16
Other                    Department of Natural Resources
Name: 10, dtype: object

In [35]:
df2.index


Out[35]:
Int64Index([10, 11, 599, 1000], dtype='int64', name='Original Row')

In [36]:
df2.columns


Out[36]:
Index(['Location Name', 'Congress Dist', 'Other'], dtype='object')

In [37]:
df


Out[37]:
Agency Name Location Name Address City Zip code County Congress Dist Congressional Full Name Rep Dist Rep Full Name ... Bldg Status Year Acquired Year Constructed Square Footage Total Floors Floors Above Grade Floors Below Grade Usage Description Usage Description 2 Usage Description 3
0 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 1975 1975 144 1 1 0 Unusual Unusual Not provided
1 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
2 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
3 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
4 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
5 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
6 Department of Natural Resources Dixon Springs State Park - Pope County Rr #2 Golconda 62938 Pope 15 John Shimkus 118 Phelps Brandon W. ... In Use 2000 2000 120 1 1 0 Unusual Unusual Not provided
7 Department of Natural Resources Dixon Springs State Park - Pope County Rr #2 Golconda 62938 Pope 15 John Shimkus 118 Phelps Brandon W. ... In Use 2000 2000 120 1 1 0 Unusual Unusual Not provided
8 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
9 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
10 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
11 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
12 Department of Natural Resources Eldon Hazlet State Park - Clinton County Keyesport Road Carlyle 62231 Clinton 15 John Shimkus 107 Cavaletto John D. ... In Use 1999 1999 96 1 1 0 Storage Storage Not provided
13 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 1980 1980 625 1 1 0 Assembly Assembly Not provided
14 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
15 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
16 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 1997 1997 740 1 1 0 Assembly Assembly Not provided
17 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 320 1 1 0 Assembly Assembly Not provided
18 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
19 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 1976 1976 625 1 1 0 Assembly Assembly Not provided
20 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
21 Department of Natural Resources Wolf Creek State Park R.r. 1 Box 99 Windsor 62534 Shelby 15 John Shimkus 102 Brown Adam ... In Use 1980 1980 144 1 1 0 Storage Storage Not provided
22 Department of Natural Resources Wolf Creek State Park R.r. 1 Box 99 Windsor 62534 Shelby 15 John Shimkus 102 Brown Adam ... In Use 1994 1994 2000 1 1 0 Storage Storage Not provided
23 Department of Corrections Dwight Correctional Center - Livingston County Route 17 West Dwight 60420 Livingston 16 Adam Kinzinger 90 Demmer Tom ... In Use 2001 2001 2048 1 1 0 Industrial Industrial Not provided
24 Department of Human Services Joliet Sexually Violent Persons Facility 1125 North Collins Street Joliet 60432 Will 11 Bill Foster 86 Walsh, Jr. Lawrence M. ... In Use 2001 2001 22000 2 2 0 Health Care Detention & Correc Not provided
25 Department of Corrections Southwestern Correctional Center - E. St. Louis 950 Kingshighway P.o. Box 50 East St Louis 62203 St. Clair 12 Mike Bost 113 Hoffman Jay ... In Use 2000 2000 120 1 1 0 Storage Storage Not provided
26 Department of Transportation Fithian Maintenance Storage Facility - Vermili... 1518 East 1800 North Road Fithian 61844 Vermilion 15 John Shimkus 104 Hays Chad ... In Use 2000 2000 4860 1 1 0 Storage Storage Not provided
27 Department of State Police Effingham District 12 - Effingham County 2 Miles East Of Mason Effingham 62454 Effingham 15 John Shimkus 107 Cavaletto John D. ... In Use 2000 2000 156 1 1 0 Industrial Industrial Not provided
28 Department of Military Affairs Marseilles Armory (Training Area) - LaSalle Co. 2515 N. 23rd. Road Marseilles 61341 LaSalle 16 Adam Kinzinger 75 Anthony John D. ... In Use 2000 2000 1080 1 1 0 Unusual Unusual Not provided
29 Department of Agriculture DuQuoin State Fairgrounds - Perry County Route #2, Box 306 Duquoin 62832 Perry 12 Mike Bost 115 Bryant Terri ... In Use 2000 2000 2020 1 1 0 Storage Storage Not provided
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
8819 Western Illinois University Western Illinois University - Macomb 904 W. Murray Street Macomb 61455 McDonough 18 Darin M. LaHood 93 Hammond Norine ... In Use 2007 2007 9732 1 0 0 Assembly NaN NaN
8820 Western Illinois University Western Illinois University - Macomb 900 W. University Drive Macomb 61455 McDonough 18 Darin M. LaHood 93 Hammond Norine ... In Use 1999 1999 185 1 0 0 Assembly NaN NaN
8821 Department of Military Affairs Rantoul Military Affairs 204 West Borman Drive Rantoul 61866 Champaign 15 John Shimkus 104 Hays Chad ... In Progress 2015 2015 25335 2 0 0 Assembly Storage NaN
8822 Department of Military Affairs Rantoul Military Affairs 204 West Borman Drive Rantoul 61866 Champaign 15 John Shimkus 104 Hays Chad ... In Progress 2015 2015 17512 2 0 0 Education Business NaN
8823 Department of Military Affairs Rantoul Military Affairs 204 West Borman Drive Rantoul 61866 Champaign 15 John Shimkus 104 Hays Chad ... In Progress 2015 2015 88657 4 0 0 Residential Business NaN
8824 Department of Transportation Frankfort USE THIS NUMBER FOR THE NEXT NEW BUILDING # AT... SPRINGFIELD 62703 Will 1 Bobby L. Rush 80 DeLuca Anthony ... In Progress 0 0 0 0 0 0 Not provided NaN NaN
8825 Department of Transportation Monmouth Traffic Operations - Warren County 710 180th Ave., Route 4, Box 6A Monmouth 61462 Warren 17 Cheri Bustos 94 Frese Randy ... In Progress 2016 2016 3600 1 0 0 Storage Storage NaN
8826 Department of Corrections Jacksonville Correctional Center - Morgan County 2268 East Morton Avenue Jacksonville 62650 Morgan 18 Darin M. LaHood 100 Davidsmeyer C. D. ... In Use 2015 2015 384 1 0 0 Not provided Storage NaN
8827 Department of Transportation Fap310 Rte 111-Mitchell 5987 State Route 111 Edwardsville 62025 Madison 17 Cheri Bustos 72 Verschoore Patrick ... In Progress 2015 2015 6110 1 0 0 Storage Storage NaN
8828 Department of Transportation Robinson Maintenance Yard - Crawford County 13125  East 1050th Avenue Robinson 62454 Crawford 15 John Shimkus 110 Phillips Reginald ... In Progress 2015 2015 2464 1 0 0 Storage NaN NaN
8829 Department of Transportation Olney Maintenance Storage Facility - Richland ... 3964 North Gentry Road Olney 62450 Richland 15 John Shimkus 109 Reis David ... In Progress 2016 2016 2464 1 0 0 Storage NaN NaN
8830 Department of Transportation Charleston Maintenance Yard 369 West Coolidge Charleston 61930 Coles 15 John Shimkus 110 Phillips Reginald ... In Progress 2016 2016 2464 1 0 0 Storage NaN NaN
8831 Department of Transportation Vandalia Maintenance Facility - Fayette County 910 Imco Drive Vandalia 61247 Fayette 15 John Shimkus 107 Cavaletto John D. ... In Progress 2016 2016 3105 1 0 0 Storage NaN NaN
8832 Department of Transportation Olney Maintenance Storage Facility - Richland ... 3964 N. Gentry Road Olney 62450 Richland 15 John Shimkus 109 Reis David ... In Use 0 0 1080 1 0 0 Storage Storage NaN
8833 Department of Transportation Pierron Maintenance Facility 13701 Schuster Road Pierron 62273 Madison 15 John Shimkus 108 Meier Charles E. ... In Progress 0 2016 4368 1 0 0 Utiility & Miscellan Storage NaN
8834 Department of Military Affairs Peoria Army Aviation Support Facility 12.0 Peoria 62702 Peoria 17 Cheri Bustos 92 Gordon-Booth Jehan A. ... Abandon 0 1941 2600 1 0 0 Storage Storage NaN
8835 Department of Military Affairs Peoria Army Aviation Support Facility 2323 South Airport Road Peoria 61607 Peoria 17 Cheri Bustos 92 Gordon-Booth Jehan A. ... Abandon 0 0 2600 1 0 0 Storage Storage NaN
8836 Department of Military Affairs Sparta Armory - Randolph County 1803 North Hill Crest Dr Sparta 62286 Randolph 12 Mike Bost 116 Costello, II Jerry F. ... In Progress 0 0 0 1 0 0 Utiility & Miscellan NaN NaN
8837 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 1980 1980 768 1 0 0 Storage Utiility & Miscellan NaN
8838 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 1998 1998 440 1 0 0 Storage Utiility & Miscellan NaN
8839 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 2000 2000 24 1 0 0 Utiility & Miscellan Utiility & Miscellan NaN
8840 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 2001 2001 180 1 0 0 Assembly Storage NaN
8841 Department of Military Affairs Peoria Army Aviation Support Facility 2323 S. Airport Rd Peoria 61607 Peoria 17 Cheri Bustos 92 Gordon-Booth Jehan A. ... In Progress 0 2017 288 1 0 0 Utiility & Miscellan Utiility & Miscellan NaN
8842 Department of Transportation Ashkum Team Section Headquarters Route 2, Box 2016 Ashkum 60911 Iroquois 16 Adam Kinzinger 106 Bennett Thomas ... In Use 2006 2006 1024 1 0 0 Utiility & Miscellan Storage NaN
8843 Department of Transportation Galena Maintenance Storage Facility 5988 High Ridge Road Galena 61036 Jo Daviess 17 Cheri Bustos 89 Stewart Brian W. ... In Progress 0 2017 2923 1 0 0 Storage Storage NaN
8844 Department of Transportation Monmouth Traffic Operations - Warren County 710 180th Avenue Monmouth 61462 Warren 17 Cheri Bustos 94 Frese Randy ... In Use 2015 2015 805 1 0 0 Storage Utiility & Miscellan NaN
8845 Department of Transportation Monmouth Traffic Operations - Warren County 710 180th Avenue Monmouth 61462 Warren 17 Cheri Bustos 94 Frese Randy ... In Use 1995 1995 2030 1 0 0 Storage Utiility & Miscellan NaN
8846 Department of Transportation Bult Field 28261 S. Kedzie Ave. Monee 60449 Will 2 Robin Kelly 79 Cloonen Katherine ... In Use 2014 2006 13387 1 0 0 Utiility & Miscellan NaN NaN
8847 Department of Transportation Elgin Maint. Bldg. (Rt. 19/Shales)  - Kane County 525 Shale Parkway Elgin 60120 Kane 8 Tammy Duckworth 43 Moeller Anna ... In Use 2016 2016 3793 1 0 0 Storage Storage NaN
8848 Department of Transportation Alsip Maintenance Yard - Cook County 11801 S. Ridgeland Avenue Worth 60482 Cook 1 Bobby L. Rush 35 Hurley Frances Ann ... In Use 2016 2016 3793 1 0 0 Storage Storage NaN

8849 rows × 22 columns


In [40]:
orig_agency = df["Agency Name"]

In [41]:
orig_agency.dtype


Out[41]:
dtype('O')

In [43]:
cat_agency = orig_agency.astype("category")

In [44]:
cat_agency.dtype


Out[44]:
category

In [45]:
df["Agency Name"] = cat_agency

In [47]:
df


Out[47]:
Agency Name Location Name Address City Zip code County Congress Dist Congressional Full Name Rep Dist Rep Full Name ... Bldg Status Year Acquired Year Constructed Square Footage Total Floors Floors Above Grade Floors Below Grade Usage Description Usage Description 2 Usage Description 3
0 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 1975 1975 144 1 1 0 Unusual Unusual Not provided
1 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
2 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
3 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
4 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
5 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
6 Department of Natural Resources Dixon Springs State Park - Pope County Rr #2 Golconda 62938 Pope 15 John Shimkus 118 Phelps Brandon W. ... In Use 2000 2000 120 1 1 0 Unusual Unusual Not provided
7 Department of Natural Resources Dixon Springs State Park - Pope County Rr #2 Golconda 62938 Pope 15 John Shimkus 118 Phelps Brandon W. ... In Use 2000 2000 120 1 1 0 Unusual Unusual Not provided
8 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
9 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
10 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
11 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
12 Department of Natural Resources Eldon Hazlet State Park - Clinton County Keyesport Road Carlyle 62231 Clinton 15 John Shimkus 107 Cavaletto John D. ... In Use 1999 1999 96 1 1 0 Storage Storage Not provided
13 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 1980 1980 625 1 1 0 Assembly Assembly Not provided
14 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
15 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
16 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 1997 1997 740 1 1 0 Assembly Assembly Not provided
17 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 320 1 1 0 Assembly Assembly Not provided
18 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
19 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 1976 1976 625 1 1 0 Assembly Assembly Not provided
20 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
21 Department of Natural Resources Wolf Creek State Park R.r. 1 Box 99 Windsor 62534 Shelby 15 John Shimkus 102 Brown Adam ... In Use 1980 1980 144 1 1 0 Storage Storage Not provided
22 Department of Natural Resources Wolf Creek State Park R.r. 1 Box 99 Windsor 62534 Shelby 15 John Shimkus 102 Brown Adam ... In Use 1994 1994 2000 1 1 0 Storage Storage Not provided
23 Department of Corrections Dwight Correctional Center - Livingston County Route 17 West Dwight 60420 Livingston 16 Adam Kinzinger 90 Demmer Tom ... In Use 2001 2001 2048 1 1 0 Industrial Industrial Not provided
24 Department of Human Services Joliet Sexually Violent Persons Facility 1125 North Collins Street Joliet 60432 Will 11 Bill Foster 86 Walsh, Jr. Lawrence M. ... In Use 2001 2001 22000 2 2 0 Health Care Detention & Correc Not provided
25 Department of Corrections Southwestern Correctional Center - E. St. Louis 950 Kingshighway P.o. Box 50 East St Louis 62203 St. Clair 12 Mike Bost 113 Hoffman Jay ... In Use 2000 2000 120 1 1 0 Storage Storage Not provided
26 Department of Transportation Fithian Maintenance Storage Facility - Vermili... 1518 East 1800 North Road Fithian 61844 Vermilion 15 John Shimkus 104 Hays Chad ... In Use 2000 2000 4860 1 1 0 Storage Storage Not provided
27 Department of State Police Effingham District 12 - Effingham County 2 Miles East Of Mason Effingham 62454 Effingham 15 John Shimkus 107 Cavaletto John D. ... In Use 2000 2000 156 1 1 0 Industrial Industrial Not provided
28 Department of Military Affairs Marseilles Armory (Training Area) - LaSalle Co. 2515 N. 23rd. Road Marseilles 61341 LaSalle 16 Adam Kinzinger 75 Anthony John D. ... In Use 2000 2000 1080 1 1 0 Unusual Unusual Not provided
29 Department of Agriculture DuQuoin State Fairgrounds - Perry County Route #2, Box 306 Duquoin 62832 Perry 12 Mike Bost 115 Bryant Terri ... In Use 2000 2000 2020 1 1 0 Storage Storage Not provided
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
8819 Western Illinois University Western Illinois University - Macomb 904 W. Murray Street Macomb 61455 McDonough 18 Darin M. LaHood 93 Hammond Norine ... In Use 2007 2007 9732 1 0 0 Assembly NaN NaN
8820 Western Illinois University Western Illinois University - Macomb 900 W. University Drive Macomb 61455 McDonough 18 Darin M. LaHood 93 Hammond Norine ... In Use 1999 1999 185 1 0 0 Assembly NaN NaN
8821 Department of Military Affairs Rantoul Military Affairs 204 West Borman Drive Rantoul 61866 Champaign 15 John Shimkus 104 Hays Chad ... In Progress 2015 2015 25335 2 0 0 Assembly Storage NaN
8822 Department of Military Affairs Rantoul Military Affairs 204 West Borman Drive Rantoul 61866 Champaign 15 John Shimkus 104 Hays Chad ... In Progress 2015 2015 17512 2 0 0 Education Business NaN
8823 Department of Military Affairs Rantoul Military Affairs 204 West Borman Drive Rantoul 61866 Champaign 15 John Shimkus 104 Hays Chad ... In Progress 2015 2015 88657 4 0 0 Residential Business NaN
8824 Department of Transportation Frankfort USE THIS NUMBER FOR THE NEXT NEW BUILDING # AT... SPRINGFIELD 62703 Will 1 Bobby L. Rush 80 DeLuca Anthony ... In Progress 0 0 0 0 0 0 Not provided NaN NaN
8825 Department of Transportation Monmouth Traffic Operations - Warren County 710 180th Ave., Route 4, Box 6A Monmouth 61462 Warren 17 Cheri Bustos 94 Frese Randy ... In Progress 2016 2016 3600 1 0 0 Storage Storage NaN
8826 Department of Corrections Jacksonville Correctional Center - Morgan County 2268 East Morton Avenue Jacksonville 62650 Morgan 18 Darin M. LaHood 100 Davidsmeyer C. D. ... In Use 2015 2015 384 1 0 0 Not provided Storage NaN
8827 Department of Transportation Fap310 Rte 111-Mitchell 5987 State Route 111 Edwardsville 62025 Madison 17 Cheri Bustos 72 Verschoore Patrick ... In Progress 2015 2015 6110 1 0 0 Storage Storage NaN
8828 Department of Transportation Robinson Maintenance Yard - Crawford County 13125  East 1050th Avenue Robinson 62454 Crawford 15 John Shimkus 110 Phillips Reginald ... In Progress 2015 2015 2464 1 0 0 Storage NaN NaN
8829 Department of Transportation Olney Maintenance Storage Facility - Richland ... 3964 North Gentry Road Olney 62450 Richland 15 John Shimkus 109 Reis David ... In Progress 2016 2016 2464 1 0 0 Storage NaN NaN
8830 Department of Transportation Charleston Maintenance Yard 369 West Coolidge Charleston 61930 Coles 15 John Shimkus 110 Phillips Reginald ... In Progress 2016 2016 2464 1 0 0 Storage NaN NaN
8831 Department of Transportation Vandalia Maintenance Facility - Fayette County 910 Imco Drive Vandalia 61247 Fayette 15 John Shimkus 107 Cavaletto John D. ... In Progress 2016 2016 3105 1 0 0 Storage NaN NaN
8832 Department of Transportation Olney Maintenance Storage Facility - Richland ... 3964 N. Gentry Road Olney 62450 Richland 15 John Shimkus 109 Reis David ... In Use 0 0 1080 1 0 0 Storage Storage NaN
8833 Department of Transportation Pierron Maintenance Facility 13701 Schuster Road Pierron 62273 Madison 15 John Shimkus 108 Meier Charles E. ... In Progress 0 2016 4368 1 0 0 Utiility & Miscellan Storage NaN
8834 Department of Military Affairs Peoria Army Aviation Support Facility 12.0 Peoria 62702 Peoria 17 Cheri Bustos 92 Gordon-Booth Jehan A. ... Abandon 0 1941 2600 1 0 0 Storage Storage NaN
8835 Department of Military Affairs Peoria Army Aviation Support Facility 2323 South Airport Road Peoria 61607 Peoria 17 Cheri Bustos 92 Gordon-Booth Jehan A. ... Abandon 0 0 2600 1 0 0 Storage Storage NaN
8836 Department of Military Affairs Sparta Armory - Randolph County 1803 North Hill Crest Dr Sparta 62286 Randolph 12 Mike Bost 116 Costello, II Jerry F. ... In Progress 0 0 0 1 0 0 Utiility & Miscellan NaN NaN
8837 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 1980 1980 768 1 0 0 Storage Utiility & Miscellan NaN
8838 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 1998 1998 440 1 0 0 Storage Utiility & Miscellan NaN
8839 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 2000 2000 24 1 0 0 Utiility & Miscellan Utiility & Miscellan NaN
8840 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 2001 2001 180 1 0 0 Assembly Storage NaN
8841 Department of Military Affairs Peoria Army Aviation Support Facility 2323 S. Airport Rd Peoria 61607 Peoria 17 Cheri Bustos 92 Gordon-Booth Jehan A. ... In Progress 0 2017 288 1 0 0 Utiility & Miscellan Utiility & Miscellan NaN
8842 Department of Transportation Ashkum Team Section Headquarters Route 2, Box 2016 Ashkum 60911 Iroquois 16 Adam Kinzinger 106 Bennett Thomas ... In Use 2006 2006 1024 1 0 0 Utiility & Miscellan Storage NaN
8843 Department of Transportation Galena Maintenance Storage Facility 5988 High Ridge Road Galena 61036 Jo Daviess 17 Cheri Bustos 89 Stewart Brian W. ... In Progress 0 2017 2923 1 0 0 Storage Storage NaN
8844 Department of Transportation Monmouth Traffic Operations - Warren County 710 180th Avenue Monmouth 61462 Warren 17 Cheri Bustos 94 Frese Randy ... In Use 2015 2015 805 1 0 0 Storage Utiility & Miscellan NaN
8845 Department of Transportation Monmouth Traffic Operations - Warren County 710 180th Avenue Monmouth 61462 Warren 17 Cheri Bustos 94 Frese Randy ... In Use 1995 1995 2030 1 0 0 Storage Utiility & Miscellan NaN
8846 Department of Transportation Bult Field 28261 S. Kedzie Ave. Monee 60449 Will 2 Robin Kelly 79 Cloonen Katherine ... In Use 2014 2006 13387 1 0 0 Utiility & Miscellan NaN NaN
8847 Department of Transportation Elgin Maint. Bldg. (Rt. 19/Shales)  - Kane County 525 Shale Parkway Elgin 60120 Kane 8 Tammy Duckworth 43 Moeller Anna ... In Use 2016 2016 3793 1 0 0 Storage Storage NaN
8848 Department of Transportation Alsip Maintenance Yard - Cook County 11801 S. Ridgeland Avenue Worth 60482 Cook 1 Bobby L. Rush 35 Hurley Frances Ann ... In Use 2016 2016 3793 1 0 0 Storage Storage NaN

8849 rows × 22 columns


In [49]:
cat_agency.value_counts()


Out[49]:
Department of Natural Resources              3248
Department of Corrections                    1408
Department of Transportation                 1110
Department of Human Services                  619
University of Illinois                        518
Southern Illinois University                  419
Historic Preservation Agency                  284
Department of Agriculture                     228
Department of Military Affairs                226
Department of Juvenile Justice                140
Department of State Police                    109
Illinois State University                     102
Department of Veterans' Affairs                94
Northern Illinois University                   79
Department of Central Management Services      60
Western Illinois University                    42
Office of the Secretary of State               41
Eastern Illinois University                    35
Northeastern Illinois University               18
Chicago State University                       16
Illinois Community College Board               15
Governors State University                     11
Illinois Board of Higher Education             10
Illinois Medical District Commission            3
Illinois Emergency Management Agency            2
Department of Public Health                     2
Appellate Court / Third District                2
Appellate Court / Fourth District               1
Appellate Court / Second District               1
Governor's Office                               1
Office of the Attorney General                  1
Illinois Courts                                 1
Department of Revenue                           1
IL State Board of Education                     1
Appellate Court / Fifth District                1
Name: Agency Name, dtype: int64

In [50]:
df["Agency Name"].value_counts()


Out[50]:
Department of Natural Resources              3248
Department of Corrections                    1408
Department of Transportation                 1110
Department of Human Services                  619
University of Illinois                        518
Southern Illinois University                  419
Historic Preservation Agency                  284
Department of Agriculture                     228
Department of Military Affairs                226
Department of Juvenile Justice                140
Department of State Police                    109
Illinois State University                     102
Department of Veterans' Affairs                94
Northern Illinois University                   79
Department of Central Management Services      60
Western Illinois University                    42
Office of the Secretary of State               41
Eastern Illinois University                    35
Northeastern Illinois University               18
Chicago State University                       16
Illinois Community College Board               15
Governors State University                     11
Illinois Board of Higher Education             10
Illinois Medical District Commission            3
Illinois Emergency Management Agency            2
Department of Public Health                     2
Appellate Court / Third District                2
Appellate Court / Fourth District               1
Appellate Court / Second District               1
Governor's Office                               1
Office of the Attorney General                  1
Illinois Courts                                 1
Department of Revenue                           1
IL State Board of Education                     1
Appellate Court / Fifth District                1
Name: Agency Name, dtype: int64

In [52]:
df["Zip code"].value_counts()


Out[52]:
62702    265
62901    258
62037    235
61801    220
62958    199
61820    146
62471    130
62656    126
62259    126
62260    123
60434    106
61764    104
61761    102
60477    100
61373     99
62627     96
62995     92
62650     89
62675     88
62703     84
61341     83
61858     83
61615     83
62897     81
60466     79
62231     79
61021     76
62233     76
62832     75
61074     73
        ... 
61108      1
62060      1
62012      1
62280      1
62888      1
62896      1
62844      1
61720      1
62209      1
60534      1
61101      1
61420      1
61245      1
61072      1
62161      1
60018      1
60070      1
62029      1
61605      1
61267      1
61368      1
61376      1
62047      1
60060      1
60140      1
60164      1
61247      1
61103      1
61011      1
62882      1
Name: Zip code, dtype: int64

In [53]:
df


Out[53]:
Agency Name Location Name Address City Zip code County Congress Dist Congressional Full Name Rep Dist Rep Full Name ... Bldg Status Year Acquired Year Constructed Square Footage Total Floors Floors Above Grade Floors Below Grade Usage Description Usage Description 2 Usage Description 3
0 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 1975 1975 144 1 1 0 Unusual Unusual Not provided
1 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
2 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
3 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
4 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
5 Department of Natural Resources Anderson Lake Conservation Area - Fulton County Anderson Lake C.a. Astoria 61501 Fulton 17 Cheri Bustos 93 Hammond Norine ... In Use 2004 2004 144 1 1 0 Unusual Unusual Not provided
6 Department of Natural Resources Dixon Springs State Park - Pope County Rr #2 Golconda 62938 Pope 15 John Shimkus 118 Phelps Brandon W. ... In Use 2000 2000 120 1 1 0 Unusual Unusual Not provided
7 Department of Natural Resources Dixon Springs State Park - Pope County Rr #2 Golconda 62938 Pope 15 John Shimkus 118 Phelps Brandon W. ... In Use 2000 2000 120 1 1 0 Unusual Unusual Not provided
8 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
9 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
10 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
11 Department of Natural Resources Matthiessen State Park - LaSalle County R. R. 178, Box 509 Utica 61373 LaSalle 16 Adam Kinzinger 76 Mautino Frank J. ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
12 Department of Natural Resources Eldon Hazlet State Park - Clinton County Keyesport Road Carlyle 62231 Clinton 15 John Shimkus 107 Cavaletto John D. ... In Use 1999 1999 96 1 1 0 Storage Storage Not provided
13 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 1980 1980 625 1 1 0 Assembly Assembly Not provided
14 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
15 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
16 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 1997 1997 740 1 1 0 Assembly Assembly Not provided
17 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 320 1 1 0 Assembly Assembly Not provided
18 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
19 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 1976 1976 625 1 1 0 Assembly Assembly Not provided
20 Department of Natural Resources Weinberg-King State Park - Schuyler County P.o. Box 203 Augusta 62311 Schuyler 18 Darin M. LaHood 93 Hammond Norine ... In Use 2000 2000 144 1 1 0 Unusual Unusual Not provided
21 Department of Natural Resources Wolf Creek State Park R.r. 1 Box 99 Windsor 62534 Shelby 15 John Shimkus 102 Brown Adam ... In Use 1980 1980 144 1 1 0 Storage Storage Not provided
22 Department of Natural Resources Wolf Creek State Park R.r. 1 Box 99 Windsor 62534 Shelby 15 John Shimkus 102 Brown Adam ... In Use 1994 1994 2000 1 1 0 Storage Storage Not provided
23 Department of Corrections Dwight Correctional Center - Livingston County Route 17 West Dwight 60420 Livingston 16 Adam Kinzinger 90 Demmer Tom ... In Use 2001 2001 2048 1 1 0 Industrial Industrial Not provided
24 Department of Human Services Joliet Sexually Violent Persons Facility 1125 North Collins Street Joliet 60432 Will 11 Bill Foster 86 Walsh, Jr. Lawrence M. ... In Use 2001 2001 22000 2 2 0 Health Care Detention & Correc Not provided
25 Department of Corrections Southwestern Correctional Center - E. St. Louis 950 Kingshighway P.o. Box 50 East St Louis 62203 St. Clair 12 Mike Bost 113 Hoffman Jay ... In Use 2000 2000 120 1 1 0 Storage Storage Not provided
26 Department of Transportation Fithian Maintenance Storage Facility - Vermili... 1518 East 1800 North Road Fithian 61844 Vermilion 15 John Shimkus 104 Hays Chad ... In Use 2000 2000 4860 1 1 0 Storage Storage Not provided
27 Department of State Police Effingham District 12 - Effingham County 2 Miles East Of Mason Effingham 62454 Effingham 15 John Shimkus 107 Cavaletto John D. ... In Use 2000 2000 156 1 1 0 Industrial Industrial Not provided
28 Department of Military Affairs Marseilles Armory (Training Area) - LaSalle Co. 2515 N. 23rd. Road Marseilles 61341 LaSalle 16 Adam Kinzinger 75 Anthony John D. ... In Use 2000 2000 1080 1 1 0 Unusual Unusual Not provided
29 Department of Agriculture DuQuoin State Fairgrounds - Perry County Route #2, Box 306 Duquoin 62832 Perry 12 Mike Bost 115 Bryant Terri ... In Use 2000 2000 2020 1 1 0 Storage Storage Not provided
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
8819 Western Illinois University Western Illinois University - Macomb 904 W. Murray Street Macomb 61455 McDonough 18 Darin M. LaHood 93 Hammond Norine ... In Use 2007 2007 9732 1 0 0 Assembly NaN NaN
8820 Western Illinois University Western Illinois University - Macomb 900 W. University Drive Macomb 61455 McDonough 18 Darin M. LaHood 93 Hammond Norine ... In Use 1999 1999 185 1 0 0 Assembly NaN NaN
8821 Department of Military Affairs Rantoul Military Affairs 204 West Borman Drive Rantoul 61866 Champaign 15 John Shimkus 104 Hays Chad ... In Progress 2015 2015 25335 2 0 0 Assembly Storage NaN
8822 Department of Military Affairs Rantoul Military Affairs 204 West Borman Drive Rantoul 61866 Champaign 15 John Shimkus 104 Hays Chad ... In Progress 2015 2015 17512 2 0 0 Education Business NaN
8823 Department of Military Affairs Rantoul Military Affairs 204 West Borman Drive Rantoul 61866 Champaign 15 John Shimkus 104 Hays Chad ... In Progress 2015 2015 88657 4 0 0 Residential Business NaN
8824 Department of Transportation Frankfort USE THIS NUMBER FOR THE NEXT NEW BUILDING # AT... SPRINGFIELD 62703 Will 1 Bobby L. Rush 80 DeLuca Anthony ... In Progress 0 0 0 0 0 0 Not provided NaN NaN
8825 Department of Transportation Monmouth Traffic Operations - Warren County 710 180th Ave., Route 4, Box 6A Monmouth 61462 Warren 17 Cheri Bustos 94 Frese Randy ... In Progress 2016 2016 3600 1 0 0 Storage Storage NaN
8826 Department of Corrections Jacksonville Correctional Center - Morgan County 2268 East Morton Avenue Jacksonville 62650 Morgan 18 Darin M. LaHood 100 Davidsmeyer C. D. ... In Use 2015 2015 384 1 0 0 Not provided Storage NaN
8827 Department of Transportation Fap310 Rte 111-Mitchell 5987 State Route 111 Edwardsville 62025 Madison 17 Cheri Bustos 72 Verschoore Patrick ... In Progress 2015 2015 6110 1 0 0 Storage Storage NaN
8828 Department of Transportation Robinson Maintenance Yard - Crawford County 13125  East 1050th Avenue Robinson 62454 Crawford 15 John Shimkus 110 Phillips Reginald ... In Progress 2015 2015 2464 1 0 0 Storage NaN NaN
8829 Department of Transportation Olney Maintenance Storage Facility - Richland ... 3964 North Gentry Road Olney 62450 Richland 15 John Shimkus 109 Reis David ... In Progress 2016 2016 2464 1 0 0 Storage NaN NaN
8830 Department of Transportation Charleston Maintenance Yard 369 West Coolidge Charleston 61930 Coles 15 John Shimkus 110 Phillips Reginald ... In Progress 2016 2016 2464 1 0 0 Storage NaN NaN
8831 Department of Transportation Vandalia Maintenance Facility - Fayette County 910 Imco Drive Vandalia 61247 Fayette 15 John Shimkus 107 Cavaletto John D. ... In Progress 2016 2016 3105 1 0 0 Storage NaN NaN
8832 Department of Transportation Olney Maintenance Storage Facility - Richland ... 3964 N. Gentry Road Olney 62450 Richland 15 John Shimkus 109 Reis David ... In Use 0 0 1080 1 0 0 Storage Storage NaN
8833 Department of Transportation Pierron Maintenance Facility 13701 Schuster Road Pierron 62273 Madison 15 John Shimkus 108 Meier Charles E. ... In Progress 0 2016 4368 1 0 0 Utiility & Miscellan Storage NaN
8834 Department of Military Affairs Peoria Army Aviation Support Facility 12.0 Peoria 62702 Peoria 17 Cheri Bustos 92 Gordon-Booth Jehan A. ... Abandon 0 1941 2600 1 0 0 Storage Storage NaN
8835 Department of Military Affairs Peoria Army Aviation Support Facility 2323 South Airport Road Peoria 61607 Peoria 17 Cheri Bustos 92 Gordon-Booth Jehan A. ... Abandon 0 0 2600 1 0 0 Storage Storage NaN
8836 Department of Military Affairs Sparta Armory - Randolph County 1803 North Hill Crest Dr Sparta 62286 Randolph 12 Mike Bost 116 Costello, II Jerry F. ... In Progress 0 0 0 1 0 0 Utiility & Miscellan NaN NaN
8837 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 1980 1980 768 1 0 0 Storage Utiility & Miscellan NaN
8838 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 1998 1998 440 1 0 0 Storage Utiility & Miscellan NaN
8839 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 2000 2000 24 1 0 0 Utiility & Miscellan Utiility & Miscellan NaN
8840 Department of Transportation Milan Maintenance Storage Facility 4128 69th Avenue Milan 61264 Rock Island 17 Cheri Bustos 71 Smiddy Mike ... In Use 2001 2001 180 1 0 0 Assembly Storage NaN
8841 Department of Military Affairs Peoria Army Aviation Support Facility 2323 S. Airport Rd Peoria 61607 Peoria 17 Cheri Bustos 92 Gordon-Booth Jehan A. ... In Progress 0 2017 288 1 0 0 Utiility & Miscellan Utiility & Miscellan NaN
8842 Department of Transportation Ashkum Team Section Headquarters Route 2, Box 2016 Ashkum 60911 Iroquois 16 Adam Kinzinger 106 Bennett Thomas ... In Use 2006 2006 1024 1 0 0 Utiility & Miscellan Storage NaN
8843 Department of Transportation Galena Maintenance Storage Facility 5988 High Ridge Road Galena 61036 Jo Daviess 17 Cheri Bustos 89 Stewart Brian W. ... In Progress 0 2017 2923 1 0 0 Storage Storage NaN
8844 Department of Transportation Monmouth Traffic Operations - Warren County 710 180th Avenue Monmouth 61462 Warren 17 Cheri Bustos 94 Frese Randy ... In Use 2015 2015 805 1 0 0 Storage Utiility & Miscellan NaN
8845 Department of Transportation Monmouth Traffic Operations - Warren County 710 180th Avenue Monmouth 61462 Warren 17 Cheri Bustos 94 Frese Randy ... In Use 1995 1995 2030 1 0 0 Storage Utiility & Miscellan NaN
8846 Department of Transportation Bult Field 28261 S. Kedzie Ave. Monee 60449 Will 2 Robin Kelly 79 Cloonen Katherine ... In Use 2014 2006 13387 1 0 0 Utiility & Miscellan NaN NaN
8847 Department of Transportation Elgin Maint. Bldg. (Rt. 19/Shales)  - Kane County 525 Shale Parkway Elgin 60120 Kane 8 Tammy Duckworth 43 Moeller Anna ... In Use 2016 2016 3793 1 0 0 Storage Storage NaN
8848 Department of Transportation Alsip Maintenance Yard - Cook County 11801 S. Ridgeland Avenue Worth 60482 Cook 1 Bobby L. Rush 35 Hurley Frances Ann ... In Use 2016 2016 3793 1 0 0 Storage Storage NaN

8849 rows × 22 columns


In [54]:
import matplotlib.pyplot as plt

In [57]:
%matplotlib inline

In [61]:
df.plot("Year Constructed", "Square Footage", kind='scatter')


Out[61]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f3a3597a780>

In [65]:
df["Year Constructed"].replace(0, np.nan, inplace=True)

In [66]:
df["Year Acquired"].replace(0, np.nan, inplace=True)

In [67]:
df.plot("Year Constructed", "Square Footage", kind="scatter")


Out[67]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f3a3597a550>

In [79]:
df.groupby("Agency Name")["Square Footage"]


Out[79]:
<pandas.core.groupby.SeriesGroupBy object at 0x7f39fc35edd8>

In [81]:
wdi = pd.read_csv("/srv/nbgrader/data/WDI/WDI_Data.csv", encoding="cp1252")

In [83]:
wdi.columns


Out[83]:
Index(['Country Name', 'Country Code', 'Indicator Name', 'Indicator Code',
       '1960', '1961', '1962', '1963', '1964', '1965', '1966', '1967', '1968',
       '1969', '1970', '1971', '1972', '1973', '1974', '1975', '1976', '1977',
       '1978', '1979', '1980', '1981', '1982', '1983', '1984', '1985', '1986',
       '1987', '1988', '1989', '1990', '1991', '1992', '1993', '1994', '1995',
       '1996', '1997', '1998', '1999', '2000', '2001', '2002', '2003', '2004',
       '2005', '2006', '2007', '2008', '2009', '2010', '2011', '2012', '2013',
       '2014', '2015', '2016'],
      dtype='object')

In [84]:
wdi


Out[84]:
Country Name Country Code Indicator Name Indicator Code 1960 1961 1962 1963 1964 1965 ... 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
0 Arab World ARB 2005 PPP conversion factor, GDP (LCU per inter... PA.NUS.PPP.05 NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
1 Arab World ARB 2005 PPP conversion factor, private consumptio... PA.NUS.PRVT.PP.05 NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
2 Arab World ARB Access to electricity (% of population) EG.ELC.ACCS.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 8.436235e+01 NaN 8.628035e+01 NaN NaN NaN NaN
3 Arab World ARB Access to electricity, rural (% of rural popul... EG.ELC.ACCS.RU.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 7.198423e+01 NaN 7.391781e+01 NaN NaN NaN NaN
4 Arab World ARB Access to electricity, urban (% of urban popul... EG.ELC.ACCS.UR.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 9.383966e+01 NaN 9.515673e+01 NaN NaN NaN NaN
5 Arab World ARB Access to non-solid fuel (% of population) EG.NSF.ACCS.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 8.602252e+01 NaN 8.658057e+01 NaN NaN NaN NaN
6 Arab World ARB Access to non-solid fuel, rural (% of rural po... EG.NSF.ACCS.RU.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 7.456626e+01 NaN 7.494069e+01 NaN NaN NaN NaN
7 Arab World ARB Access to non-solid fuel, urban (% of urban po... EG.NSF.ACCS.UR.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 9.455237e+01 NaN 9.497705e+01 NaN NaN NaN NaN
8 Arab World ARB Account at a financial institution (% age 15+)... WP_time_01.1 NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
9 Arab World ARB Account at a financial institution, female (% ... WP_time_01.3 NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
10 Arab World ARB Account at a financial institution, income, po... WP_time_01.8 NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
11 Arab World ARB Account at a financial institution, income, ri... WP_time_01.9 NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
12 Arab World ARB Account at a financial institution, male (% ag... WP_time_01.2 NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
13 Arab World ARB Adequacy of social insurance programs (% of to... per_si_allsi.adq_pop_tot NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
14 Arab World ARB Adequacy of social protection and labor progra... per_allsp.adq_pop_tot NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
15 Arab World ARB Adequacy of social safety net programs (% of t... per_sa_allsa.adq_pop_tot NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
16 Arab World ARB Adequacy of unemployment benefits and ALMP (% ... per_lm_alllm.adq_pop_tot NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
17 Arab World ARB Adjusted net enrollment rate, primary, female ... SE.PRM.TENR.FE NaN NaN NaN NaN NaN NaN ... 8.058242e+01 8.147380e+01 8.169569e+01 8.287165e+01 8.286139e+01 8.440141e+01 8.391403e+01 8.382083e+01 NaN NaN
18 Arab World ARB Adjusted net enrollment rate, primary, male (%... SE.PRM.TENR.MA NaN NaN NaN NaN NaN NaN ... 8.586669e+01 8.644414e+01 8.659069e+01 8.745258e+01 8.752652e+01 8.772817e+01 8.703988e+01 8.675339e+01 NaN NaN
19 Arab World ARB Adjusted net enrolment rate, primary, both sex... SE.PRM.TENR NaN NaN NaN NaN NaN NaN ... 8.328034e+01 8.401187e+01 8.419596e+01 8.521200e+01 8.524514e+01 8.610167e+01 8.551194e+01 8.532015e+01 NaN NaN
20 Arab World ARB Adjusted net national income (annual % growth) NY.ADJ.NNTY.KD.ZG NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 9.524779e+00 6.706404e+00 2.499334e+00 NaN NaN NaN
21 Arab World ARB Adjusted net national income (constant 2010 US$) NY.ADJ.NNTY.KD NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 1.529192e+12 1.674845e+12 1.787166e+12 1.831834e+12 NaN NaN NaN
22 Arab World ARB Adjusted net national income (current US$) NY.ADJ.NNTY.CD NaN NaN NaN NaN NaN NaN ... 1.180814e+12 1.424482e+12 1.354331e+12 1.529192e+12 1.773875e+12 2.012007e+12 2.088333e+12 2.156246e+12 NaN NaN
23 Arab World ARB Adjusted net national income per capita (annua... NY.ADJ.NNTY.PC.KD.ZG NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 7.122247e+00 4.458066e+00 4.026424e-01 NaN NaN NaN
24 Arab World ARB Adjusted net national income per capita (const... NY.ADJ.NNTY.PC.KD NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 4.330613e+03 4.639050e+03 4.845862e+03 4.865373e+03 NaN NaN NaN
25 Arab World ARB Adjusted net national income per capita (curre... NY.ADJ.NNTY.PC.CD NaN NaN NaN NaN NaN NaN ... 3.591650e+03 4.228375e+03 3.924980e+03 4.330613e+03 4.913349e+03 5.455513e+03 5.546640e+03 5.611972e+03 NaN NaN
26 Arab World ARB Adjusted net savings, excluding particulate em... NY.ADJ.SVNX.GN.ZS NaN NaN NaN NaN NaN NaN ... 1.738075e+01 1.725361e+01 9.157418e+00 1.220151e+01 1.690138e+01 1.645197e+01 1.592986e+01 NaN NaN NaN
27 Arab World ARB Adjusted net savings, excluding particulate em... NY.ADJ.SVNX.CD NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
28 Arab World ARB Adjusted net savings, including particulate em... NY.ADJ.SVNG.GN.ZS NaN NaN NaN NaN NaN NaN ... 1.716176e+01 1.704717e+01 8.936666e+00 1.198311e+01 1.668852e+01 1.624965e+01 1.573042e+01 NaN NaN NaN
29 Arab World ARB Adjusted net savings, including particulate em... NY.ADJ.SVNG.CD NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
383298 Zimbabwe ZWE Urban land area where elevation is below 5 met... AG.LND.EL5M.UR.K2 NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
383299 Zimbabwe ZWE Urban population SP.URB.TOTL 473101.000000 497024.000000 524099.000000 562238.000000 603076.000000 646516.000000 ... 4.487076e+06 4.529077e+06 4.579794e+06 4.638775e+06 4.706484e+06 4.782430e+06 4.864823e+06 4.955055e+06 5.051547e+06 NaN
383300 Zimbabwe ZWE Urban population (% of total) SP.URB.TOTL.IN.ZS 12.608000 12.821000 13.082000 13.578000 14.092000 14.620000 ... 3.374300e+01 3.356000e+01 3.337800e+01 3.319600e+01 3.301500e+01 3.283400e+01 3.265400e+01 3.250100e+01 3.237600e+01 NaN
383301 Zimbabwe ZWE Urban population growth (annual %) SP.URB.GROW 4.897746 4.932942 5.304228 7.024465 7.011798 6.955472 ... 7.446744e-01 9.316901e-01 1.113585e+00 1.279630e+00 1.449081e+00 1.600765e+00 1.708155e+00 1.837793e+00 1.928627e+00 NaN
383302 Zimbabwe ZWE Urban population living in areas where elevati... EN.POP.EL5M.UR.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
383303 Zimbabwe ZWE Urban poverty gap at national poverty lines (%) SI.POV.URGP NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 1.550000e+01 NaN NaN NaN NaN NaN
383304 Zimbabwe ZWE Urban poverty headcount ratio at national pove... SI.POV.URHC NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 4.650000e+01 NaN NaN NaN NaN NaN
383305 Zimbabwe ZWE Use of IMF credit (DOD, current US$) DT.DOD.DIMF.CD NaN NaN NaN NaN NaN NaN ... 1.344610e+08 1.294260e+08 5.423170e+08 5.287290e+08 5.270950e+08 5.201240e+08 5.193420e+08 4.867300e+08 4.637530e+08 NaN
383306 Zimbabwe ZWE Use of insecticide-treated bed nets (% of unde... SH.MLR.NETS.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN 1.730000e+01 NaN 9.700000e+00 NaN NaN 2.680000e+01 NaN NaN
383307 Zimbabwe ZWE Value lost due to electrical outages (% of sales) IC.FRM.OUTG.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 8.800000e+00 NaN NaN NaN NaN NaN
383308 Zimbabwe ZWE Vitamin A supplementation coverage rate (% of ... SN.ITK.VITA.ZS NaN NaN NaN NaN NaN NaN ... 8.300000e+01 0.000000e+00 7.700000e+01 4.900000e+01 4.700000e+01 6.100000e+01 3.400000e+01 3.200000e+01 NaN NaN
383309 Zimbabwe ZWE Vulnerable employment, female (% of female emp... SL.EMP.VULN.FE.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 8.310000e+01 7.560000e+01 NaN NaN NaN NaN
383310 Zimbabwe ZWE Vulnerable employment, male (% of male employm... SL.EMP.VULN.MA.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 6.590000e+01 5.660000e+01 NaN NaN NaN NaN
383311 Zimbabwe ZWE Vulnerable employment, total (% of total emplo... SL.EMP.VULN.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 7.450000e+01 6.550000e+01 NaN NaN NaN NaN
383312 Zimbabwe ZWE Wage and salaried workers, female (% of female... SL.EMP.WORK.FE.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 1.650000e+01 2.410000e+01 NaN NaN NaN NaN
383313 Zimbabwe ZWE Wage and salaried workers, male (% of male emp... SL.EMP.WORK.MA.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 3.340000e+01 4.270000e+01 NaN NaN NaN NaN
383314 Zimbabwe ZWE Wage and salaried workers, total (% of total e... SL.EMP.WORK.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 2.490000e+01 3.400000e+01 NaN NaN NaN NaN
383315 Zimbabwe ZWE Wanted fertility rate (births per woman) SP.DYN.WFRT NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 3.500000e+00 NaN NaN NaN NaN NaN
383316 Zimbabwe ZWE Water productivity, total (constant 2010 US$ G... ER.GDP.FWTL.M3.KD NaN NaN NaN NaN NaN NaN ... 2.715723e+00 NaN NaN NaN NaN NaN NaN 3.543247e+00 NaN NaN
383317 Zimbabwe ZWE Wholesale price index (2010 = 100) FP.WPI.TOTL NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
383318 Zimbabwe ZWE Women participating in the three decisions (ow... SG.DMK.ALLD.FN.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 7.450000e+01 NaN NaN NaN NaN NaN
383319 Zimbabwe ZWE Women who believe a husband is justified in be... SG.VAW.REAS.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 3.960000e+01 NaN NaN 3.740000e+01 NaN NaN
383320 Zimbabwe ZWE Women who believe a husband is justified in be... SG.VAW.ARGU.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 1.560000e+01 NaN NaN NaN NaN NaN
383321 Zimbabwe ZWE Women who believe a husband is justified in be... SG.VAW.BURN.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 7.500000e+00 NaN NaN NaN NaN NaN
383322 Zimbabwe ZWE Women who believe a husband is justified in be... SG.VAW.GOES.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 2.230000e+01 NaN NaN NaN NaN NaN
383323 Zimbabwe ZWE Women who believe a husband is justified in be... SG.VAW.NEGL.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 2.140000e+01 NaN NaN NaN NaN NaN
383324 Zimbabwe ZWE Women who believe a husband is justified in be... SG.VAW.REFU.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 1.690000e+01 NaN NaN NaN NaN NaN
383325 Zimbabwe ZWE Women who were first married by age 18 (% of w... SP.M18.2024.FE.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN 3.010000e+01 NaN 3.050000e+01 NaN NaN 3.350000e+01 NaN NaN
383326 Zimbabwe ZWE Women's share of population ages 15+ living wi... SH.DYN.AIDS.FE.ZS NaN NaN NaN NaN NaN NaN ... 5.858609e+01 5.876080e+01 5.881242e+01 5.882594e+01 5.889931e+01 5.893908e+01 5.890013e+01 5.882233e+01 5.885555e+01 NaN
383327 Zimbabwe ZWE Youth literacy rate, population 15-24 years, b... SE.ADT.1524.LT.ZS NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 9.093070e+01 NaN NaN NaN 9.175005e+01 NaN

383328 rows × 61 columns


In [86]:
wdi2 = wdi.set_index(["Country Code", "Indicator Code"])

In [87]:
wdi2


Out[87]:
Country Name Indicator Name 1960 1961 1962 1963 1964 1965 1966 1967 ... 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
Country Code Indicator Code
ARB PA.NUS.PPP.05 Arab World 2005 PPP conversion factor, GDP (LCU per inter... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
PA.NUS.PRVT.PP.05 Arab World 2005 PPP conversion factor, private consumptio... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
EG.ELC.ACCS.ZS Arab World Access to electricity (% of population) NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 8.436235e+01 NaN 8.628035e+01 NaN NaN NaN NaN
EG.ELC.ACCS.RU.ZS Arab World Access to electricity, rural (% of rural popul... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 7.198423e+01 NaN 7.391781e+01 NaN NaN NaN NaN
EG.ELC.ACCS.UR.ZS Arab World Access to electricity, urban (% of urban popul... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 9.383966e+01 NaN 9.515673e+01 NaN NaN NaN NaN
EG.NSF.ACCS.ZS Arab World Access to non-solid fuel (% of population) NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 8.602252e+01 NaN 8.658057e+01 NaN NaN NaN NaN
EG.NSF.ACCS.RU.ZS Arab World Access to non-solid fuel, rural (% of rural po... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 7.456626e+01 NaN 7.494069e+01 NaN NaN NaN NaN
EG.NSF.ACCS.UR.ZS Arab World Access to non-solid fuel, urban (% of urban po... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 9.455237e+01 NaN 9.497705e+01 NaN NaN NaN NaN
WP_time_01.1 Arab World Account at a financial institution (% age 15+)... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
WP_time_01.3 Arab World Account at a financial institution, female (% ... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
WP_time_01.8 Arab World Account at a financial institution, income, po... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
WP_time_01.9 Arab World Account at a financial institution, income, ri... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
WP_time_01.2 Arab World Account at a financial institution, male (% ag... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
per_si_allsi.adq_pop_tot Arab World Adequacy of social insurance programs (% of to... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
per_allsp.adq_pop_tot Arab World Adequacy of social protection and labor progra... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
per_sa_allsa.adq_pop_tot Arab World Adequacy of social safety net programs (% of t... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
per_lm_alllm.adq_pop_tot Arab World Adequacy of unemployment benefits and ALMP (% ... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
SE.PRM.TENR.FE Arab World Adjusted net enrollment rate, primary, female ... NaN NaN NaN NaN NaN NaN NaN NaN ... 8.058242e+01 8.147380e+01 8.169569e+01 8.287165e+01 8.286139e+01 8.440141e+01 8.391403e+01 8.382083e+01 NaN NaN
SE.PRM.TENR.MA Arab World Adjusted net enrollment rate, primary, male (%... NaN NaN NaN NaN NaN NaN NaN NaN ... 8.586669e+01 8.644414e+01 8.659069e+01 8.745258e+01 8.752652e+01 8.772817e+01 8.703988e+01 8.675339e+01 NaN NaN
SE.PRM.TENR Arab World Adjusted net enrolment rate, primary, both sex... NaN NaN NaN NaN NaN NaN NaN NaN ... 8.328034e+01 8.401187e+01 8.419596e+01 8.521200e+01 8.524514e+01 8.610167e+01 8.551194e+01 8.532015e+01 NaN NaN
NY.ADJ.NNTY.KD.ZG Arab World Adjusted net national income (annual % growth) NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 9.524779e+00 6.706404e+00 2.499334e+00 NaN NaN NaN
NY.ADJ.NNTY.KD Arab World Adjusted net national income (constant 2010 US$) NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 1.529192e+12 1.674845e+12 1.787166e+12 1.831834e+12 NaN NaN NaN
NY.ADJ.NNTY.CD Arab World Adjusted net national income (current US$) NaN NaN NaN NaN NaN NaN NaN NaN ... 1.180814e+12 1.424482e+12 1.354331e+12 1.529192e+12 1.773875e+12 2.012007e+12 2.088333e+12 2.156246e+12 NaN NaN
NY.ADJ.NNTY.PC.KD.ZG Arab World Adjusted net national income per capita (annua... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 7.122247e+00 4.458066e+00 4.026424e-01 NaN NaN NaN
NY.ADJ.NNTY.PC.KD Arab World Adjusted net national income per capita (const... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN 4.330613e+03 4.639050e+03 4.845862e+03 4.865373e+03 NaN NaN NaN
NY.ADJ.NNTY.PC.CD Arab World Adjusted net national income per capita (curre... NaN NaN NaN NaN NaN NaN NaN NaN ... 3.591650e+03 4.228375e+03 3.924980e+03 4.330613e+03 4.913349e+03 5.455513e+03 5.546640e+03 5.611972e+03 NaN NaN
NY.ADJ.SVNX.GN.ZS Arab World Adjusted net savings, excluding particulate em... NaN NaN NaN NaN NaN NaN NaN NaN ... 1.738075e+01 1.725361e+01 9.157418e+00 1.220151e+01 1.690138e+01 1.645197e+01 1.592986e+01 NaN NaN NaN
NY.ADJ.SVNX.CD Arab World Adjusted net savings, excluding particulate em... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
NY.ADJ.SVNG.GN.ZS Arab World Adjusted net savings, including particulate em... NaN NaN NaN NaN NaN NaN NaN NaN ... 1.716176e+01 1.704717e+01 8.936666e+00 1.198311e+01 1.668852e+01 1.624965e+01 1.573042e+01 NaN NaN NaN
NY.ADJ.SVNG.CD Arab World Adjusted net savings, including particulate em... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
ZWE AG.LND.EL5M.UR.K2 Zimbabwe Urban land area where elevation is below 5 met... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
SP.URB.TOTL Zimbabwe Urban population 473101.000000 497024.000000 524099.000000 562238.000000 603076.000000 646516.000000 692786.00000 742096.000000 ... 4.487076e+06 4.529077e+06 4.579794e+06 4.638775e+06 4.706484e+06 4.782430e+06 4.864823e+06 4.955055e+06 5.051547e+06 NaN
SP.URB.TOTL.IN.ZS Zimbabwe Urban population (% of total) 12.608000 12.821000 13.082000 13.578000 14.092000 14.620000 15.16500 15.727000 ... 3.374300e+01 3.356000e+01 3.337800e+01 3.319600e+01 3.301500e+01 3.283400e+01 3.265400e+01 3.250100e+01 3.237600e+01 NaN
SP.URB.GROW Zimbabwe Urban population growth (annual %) 4.897746 4.932942 5.304228 7.024465 7.011798 6.955472 6.91232 6.875747 ... 7.446744e-01 9.316901e-01 1.113585e+00 1.279630e+00 1.449081e+00 1.600765e+00 1.708155e+00 1.837793e+00 1.928627e+00 NaN
EN.POP.EL5M.UR.ZS Zimbabwe Urban population living in areas where elevati... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
SI.POV.URGP Zimbabwe Urban poverty gap at national poverty lines (%) NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 1.550000e+01 NaN NaN NaN NaN NaN
SI.POV.URHC Zimbabwe Urban poverty headcount ratio at national pove... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 4.650000e+01 NaN NaN NaN NaN NaN
DT.DOD.DIMF.CD Zimbabwe Use of IMF credit (DOD, current US$) NaN NaN NaN NaN NaN NaN NaN NaN ... 1.344610e+08 1.294260e+08 5.423170e+08 5.287290e+08 5.270950e+08 5.201240e+08 5.193420e+08 4.867300e+08 4.637530e+08 NaN
SH.MLR.NETS.ZS Zimbabwe Use of insecticide-treated bed nets (% of unde... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN 1.730000e+01 NaN 9.700000e+00 NaN NaN 2.680000e+01 NaN NaN
IC.FRM.OUTG.ZS Zimbabwe Value lost due to electrical outages (% of sales) NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 8.800000e+00 NaN NaN NaN NaN NaN
SN.ITK.VITA.ZS Zimbabwe Vitamin A supplementation coverage rate (% of ... NaN NaN NaN NaN NaN NaN NaN NaN ... 8.300000e+01 0.000000e+00 7.700000e+01 4.900000e+01 4.700000e+01 6.100000e+01 3.400000e+01 3.200000e+01 NaN NaN
SL.EMP.VULN.FE.ZS Zimbabwe Vulnerable employment, female (% of female emp... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 8.310000e+01 7.560000e+01 NaN NaN NaN NaN
SL.EMP.VULN.MA.ZS Zimbabwe Vulnerable employment, male (% of male employm... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 6.590000e+01 5.660000e+01 NaN NaN NaN NaN
SL.EMP.VULN.ZS Zimbabwe Vulnerable employment, total (% of total emplo... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 7.450000e+01 6.550000e+01 NaN NaN NaN NaN
SL.EMP.WORK.FE.ZS Zimbabwe Wage and salaried workers, female (% of female... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 1.650000e+01 2.410000e+01 NaN NaN NaN NaN
SL.EMP.WORK.MA.ZS Zimbabwe Wage and salaried workers, male (% of male emp... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 3.340000e+01 4.270000e+01 NaN NaN NaN NaN
SL.EMP.WORK.ZS Zimbabwe Wage and salaried workers, total (% of total e... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 2.490000e+01 3.400000e+01 NaN NaN NaN NaN
SP.DYN.WFRT Zimbabwe Wanted fertility rate (births per woman) NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 3.500000e+00 NaN NaN NaN NaN NaN
ER.GDP.FWTL.M3.KD Zimbabwe Water productivity, total (constant 2010 US$ G... NaN NaN NaN NaN NaN NaN NaN NaN ... 2.715723e+00 NaN NaN NaN NaN NaN NaN 3.543247e+00 NaN NaN
FP.WPI.TOTL Zimbabwe Wholesale price index (2010 = 100) NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
SG.DMK.ALLD.FN.ZS Zimbabwe Women participating in the three decisions (ow... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 7.450000e+01 NaN NaN NaN NaN NaN
SG.VAW.REAS.ZS Zimbabwe Women who believe a husband is justified in be... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 3.960000e+01 NaN NaN 3.740000e+01 NaN NaN
SG.VAW.ARGU.ZS Zimbabwe Women who believe a husband is justified in be... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 1.560000e+01 NaN NaN NaN NaN NaN
SG.VAW.BURN.ZS Zimbabwe Women who believe a husband is justified in be... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 7.500000e+00 NaN NaN NaN NaN NaN
SG.VAW.GOES.ZS Zimbabwe Women who believe a husband is justified in be... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 2.230000e+01 NaN NaN NaN NaN NaN
SG.VAW.NEGL.ZS Zimbabwe Women who believe a husband is justified in be... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 2.140000e+01 NaN NaN NaN NaN NaN
SG.VAW.REFU.ZS Zimbabwe Women who believe a husband is justified in be... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 1.690000e+01 NaN NaN NaN NaN NaN
SP.M18.2024.FE.ZS Zimbabwe Women who were first married by age 18 (% of w... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN 3.010000e+01 NaN 3.050000e+01 NaN NaN 3.350000e+01 NaN NaN
SH.DYN.AIDS.FE.ZS Zimbabwe Women's share of population ages 15+ living wi... NaN NaN NaN NaN NaN NaN NaN NaN ... 5.858609e+01 5.876080e+01 5.881242e+01 5.882594e+01 5.889931e+01 5.893908e+01 5.890013e+01 5.882233e+01 5.885555e+01 NaN
SE.ADT.1524.LT.ZS Zimbabwe Youth literacy rate, population 15-24 years, b... NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN 9.093070e+01 NaN NaN NaN 9.175005e+01 NaN

383328 rows × 59 columns


In [88]:
wdi2.shape


Out[88]:
(383328, 59)

In [94]:
wdi2.loc["ARB", "PA.NUS.PPP.05"]


Out[94]:
Country Name                                             Arab World
Indicator Name    2005 PPP conversion factor, GDP (LCU per inter...
1960                                                            NaN
1961                                                            NaN
1962                                                            NaN
1963                                                            NaN
1964                                                            NaN
1965                                                            NaN
1966                                                            NaN
1967                                                            NaN
1968                                                            NaN
1969                                                            NaN
1970                                                            NaN
1971                                                            NaN
1972                                                            NaN
1973                                                            NaN
1974                                                            NaN
1975                                                            NaN
1976                                                            NaN
1977                                                            NaN
1978                                                            NaN
1979                                                            NaN
1980                                                            NaN
1981                                                            NaN
1982                                                            NaN
1983                                                            NaN
1984                                                            NaN
1985                                                            NaN
1986                                                            NaN
1987                                                            NaN
1988                                                            NaN
1989                                                            NaN
1990                                                            NaN
1991                                                            NaN
1992                                                            NaN
1993                                                            NaN
1994                                                            NaN
1995                                                            NaN
1996                                                            NaN
1997                                                            NaN
1998                                                            NaN
1999                                                            NaN
2000                                                            NaN
2001                                                            NaN
2002                                                            NaN
2003                                                            NaN
2004                                                            NaN
2005                                                            NaN
2006                                                            NaN
2007                                                            NaN
2008                                                            NaN
2009                                                            NaN
2010                                                            NaN
2011                                                            NaN
2012                                                            NaN
2013                                                            NaN
2014                                                            NaN
2015                                                            NaN
2016                                                            NaN
Name: (ARB, PA.NUS.PPP.05), dtype: object

In [105]:
urb_growth = wdi2[wdi2["Country Name"] == "Sweden"].loc["SWE", "SP.URB.GROW"]

In [116]:
urb_growth.loc["1960":"2016"].plot()


Out[116]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f39fc0ef7b8>

In [113]:
wdi2.loc[:, "1960":"1961"]


Out[113]:
1960 1961
Country Code Indicator Code
ARB PA.NUS.PPP.05 NaN NaN
PA.NUS.PRVT.PP.05 NaN NaN
EG.ELC.ACCS.ZS NaN NaN
EG.ELC.ACCS.RU.ZS NaN NaN
EG.ELC.ACCS.UR.ZS NaN NaN
EG.NSF.ACCS.ZS NaN NaN
EG.NSF.ACCS.RU.ZS NaN NaN
EG.NSF.ACCS.UR.ZS NaN NaN
WP_time_01.1 NaN NaN
WP_time_01.3 NaN NaN
WP_time_01.8 NaN NaN
WP_time_01.9 NaN NaN
WP_time_01.2 NaN NaN
per_si_allsi.adq_pop_tot NaN NaN
per_allsp.adq_pop_tot NaN NaN
per_sa_allsa.adq_pop_tot NaN NaN
per_lm_alllm.adq_pop_tot NaN NaN
SE.PRM.TENR.FE NaN NaN
SE.PRM.TENR.MA NaN NaN
SE.PRM.TENR NaN NaN
NY.ADJ.NNTY.KD.ZG NaN NaN
NY.ADJ.NNTY.KD NaN NaN
NY.ADJ.NNTY.CD NaN NaN
NY.ADJ.NNTY.PC.KD.ZG NaN NaN
NY.ADJ.NNTY.PC.KD NaN NaN
NY.ADJ.NNTY.PC.CD NaN NaN
NY.ADJ.SVNX.GN.ZS NaN NaN
NY.ADJ.SVNX.CD NaN NaN
NY.ADJ.SVNG.GN.ZS NaN NaN
NY.ADJ.SVNG.CD NaN NaN
... ... ... ...
ZWE AG.LND.EL5M.UR.K2 NaN NaN
SP.URB.TOTL 473101.000000 497024.000000
SP.URB.TOTL.IN.ZS 12.608000 12.821000
SP.URB.GROW 4.897746 4.932942
EN.POP.EL5M.UR.ZS NaN NaN
SI.POV.URGP NaN NaN
SI.POV.URHC NaN NaN
DT.DOD.DIMF.CD NaN NaN
SH.MLR.NETS.ZS NaN NaN
IC.FRM.OUTG.ZS NaN NaN
SN.ITK.VITA.ZS NaN NaN
SL.EMP.VULN.FE.ZS NaN NaN
SL.EMP.VULN.MA.ZS NaN NaN
SL.EMP.VULN.ZS NaN NaN
SL.EMP.WORK.FE.ZS NaN NaN
SL.EMP.WORK.MA.ZS NaN NaN
SL.EMP.WORK.ZS NaN NaN
SP.DYN.WFRT NaN NaN
ER.GDP.FWTL.M3.KD NaN NaN
FP.WPI.TOTL NaN NaN
SG.DMK.ALLD.FN.ZS NaN NaN
SG.VAW.REAS.ZS NaN NaN
SG.VAW.ARGU.ZS NaN NaN
SG.VAW.BURN.ZS NaN NaN
SG.VAW.GOES.ZS NaN NaN
SG.VAW.NEGL.ZS NaN NaN
SG.VAW.REFU.ZS NaN NaN
SP.M18.2024.FE.ZS NaN NaN
SH.DYN.AIDS.FE.ZS NaN NaN
SE.ADT.1524.LT.ZS NaN NaN

383328 rows × 2 columns


In [ ]: