python collecting data from dataframe at specific row location
Question: I am importing a data set with about 200 columns with unique column names into
pandas dataframe using read_csv.

    
    
    Data.columns
    Index([u'SAVERECORDER', u'SAVECHANNEL', u'STARTTIME', u'INT001', u'INT002',
           u'INT003', u'INT004', u'INT005', u'INT006', u'INT007',
           ...
           u'INT092', u'INT093', u'INT094', u'INT095', u'INT096', u'INT097',
           u'INT098', u'INT099', u'INT100', u'LSTIME'],
          dtype='object', length=104)
    

I want to extract 100th row from each of the columns INT001 through INT099.
Had it been few columns I would have done it manually but I don't have a clue
as to how to extract certain row number from all and store in a numpy array.
All columns INT001 through INT099 contain temperature values as double.


Answer: I would use a generator to create a list of all the columns you want like

    
    
        from string import zfill
        import numpy as np
    
        cols = ['INT0' + zfill(str(i), 2) for i in np.arange(1, 100, 1)]
    

Then you can use pandas .iloc to index by integer location as read in
[here](http://pandas.pydata.org/pandas-
docs/version/0.17.0/generated/pandas.DataFrame.iloc.html)

After that you can call .sum() on the array.

