In [1]:
import pandas as pd

In [2]:
print pd.__version__


0.20.1

In [3]:
ls


 Volume in drive C is OS
 Volume Serial Number is 1C9F-0DCB

 Directory of C:\Data\Backup\BackupGit\coal\dev

09/03/2017  10:47 AM    <DIR>          .
09/03/2017  10:47 AM    <DIR>          ..
09/03/2017  10:47 AM    <DIR>          .ipynb_checkpoints
09/03/2017  10:45 AM               582 2017-09-03-EAB-Coal Example.ipynb
               1 File(s)            582 bytes
               3 Dir(s)  15,852,748,800 bytes free

In [5]:
ls ..\data


 Volume in drive C is OS
 Volume Serial Number is 1C9F-0DCB

 Directory of C:\Data\Backup\BackupGit\coal\data

09/03/2017  10:46 AM    <DIR>          .
09/03/2017  10:46 AM    <DIR>          ..
09/03/2017  10:46 AM           435,712 coalpublic2013.xls
09/03/2017  10:46 AM           414,720 coalpublic2014.xls
09/03/2017  10:46 AM           361,984 coalpublic2015.xls
               3 File(s)      1,212,416 bytes
               2 Dir(s)  15,852,224,512 bytes free

In [14]:
# download data from https://www.eia.gov/coal/data.php#production
df = pd.read_excel("../data/coalpublic2013.xls", header=2, index_col="MSHA ID")

df.head()


Out[14]:
Year Mine Name Mine State Mine County Mine Status Mine Type Company Type Operation Type Operating Company Operating Company Address Union Code Coal Supply Region Production (short tons) Average Employees Labor Hours
MSHA ID
103381 2013 Tacoa Highwall Miner Alabama Bibb Active, men working, not producing Surface Indepedent Producer Operator Mine only Jesse Creek Mining, Llc 1615 Kent Dairy Rd, Alabaster, AL 35007 Appalachia Southern 56004 10 22392
103404 2013 Reid School Mine Alabama Blount Permanently abandoned Surface Indepedent Producer Operator Mine only Taft Coal Sales & Associates, 3000 Riverchase Galleria Ste 1, Birmingham, AL... UNIT Appalachia Southern 28807 18 28447
100759 2013 North River #1 Underground Min Alabama Fayette Active, men working, not producing Underground Indepedent Producer Operator Mine and Preparation Plant Jim Walter Resources Inc 3114 County Rd 63 S, Berry, AL 35546 UNIT Appalachia Southern 1440115 183 474784
103246 2013 Bear Creek Alabama Franklin Active Surface Indepedent Producer Operator Mine only Birmingham Coal & Coke Co., In 912 Edenton Street, Birmingham, AL 35242 Appalachia Southern 87587 13 29193
103451 2013 Knight Mine Alabama Franklin Active Surface Indepedent Producer Operator Mine only Birmingham Coal & Coke Co., In P.O. Box 354, Lynn, AL 35242 Appalachia Southern 147499 27 46393

In [12]:
def test(first="5", second="10"):
    "This is test function"
    return first+second

In [13]:
test(6,11)


Out[13]:
17

In [ ]: