In [1]:
fname = '/Users/maye/Dropbox/DDocuments/IUVS/IUVS_Calibrationdb.txt'

In [2]:
import pandas as pd

In [3]:
df = pd.read_csv(fname)

In [4]:
df.columns = [i.strip() for i in df.columns]

In [5]:
import os
def splitup(s):
    return s.split("\\")[7]
                   
df.Directory.map(splitup).value_counts()


Out[5]:
RelativeRadiometricCal_20121012    13865
FuV_Calibration_PPol_20120828       3928
RelativeRadiometricCal_20120924     3242
FUV_Calibration_SPol_20120910       2222
MUV_Calibration_SPol_20120917        557
MUV_Calibration_PPol_20120920        542
MUV_Calibration_PPol_20121003        363
FuV_Calibration_PPol_20121007        239
dtype: int64

In [6]:
df.info()


<class 'pandas.core.frame.DataFrame'>
Int64Index: 24958 entries, 0 to 24957
Data columns (total 13 columns):
FileName               24958 non-null object
Directory              24958 non-null object
Channel                24958 non-null object
TimeStamp              24958 non-null object
MCPSetVoltage(V)       24958 non-null int64
Integration(ms)        24958 non-null int64
ImageNumber            24958 non-null int64
MCPReadVoltage(kV)     24958 non-null float64
PhosphorVoltage(kV)    24958 non-null float64
IITemp(C)              24958 non-null float64
DetTemp(C)             24958 non-null float64
CMOSTemp(C)            24958 non-null float64
BlackOffset(V)         24958 non-null float64
dtypes: float64(6), int64(3), object(4)
memory usage: 2.7+ MB

In [7]:
df.columns


Out[7]:
Index(['FileName', 'Directory', 'Channel', 'TimeStamp', 'MCPSetVoltage(V)', 'Integration(ms)', 'ImageNumber', 'MCPReadVoltage(kV)', 'PhosphorVoltage(kV)', 'IITemp(C)', 'DetTemp(C)', 'CMOSTemp(C)', 'BlackOffset(V)'], dtype='object')

In [8]:
%pylab qt


Populating the interactive namespace from numpy and matplotlib

In [9]:
df['MCPSetVoltage(V)'].plot(kind='pie')


Out[9]:
<matplotlib.axes._subplots.AxesSubplot at 0x114135f60>

In [11]:
df['MCPSetVoltage(V)'].cut?


Object `cut` not found.

In [14]:
setvolts = df['MCPSetVoltage(V)']

In [18]:
pd.cut(setvolts, 10)


Out[18]:
0     (658, 742]
1     (658, 742]
2     (658, 742]
3     (658, 742]
4     (658, 742]
5     (658, 742]
6     (826, 910]
7     (826, 910]
8     (826, 910]
9     (826, 910]
10    (826, 910]
11    (826, 910]
12    (826, 910]
13    (826, 910]
14    (826, 910]
...
24943    (69.16, 154]
24944    (69.16, 154]
24945    (69.16, 154]
24946    (69.16, 154]
24947    (69.16, 154]
24948    (69.16, 154]
24949    (69.16, 154]
24950    (69.16, 154]
24951      (826, 910]
24952      (826, 910]
24953      (826, 910]
24954      (826, 910]
24955      (826, 910]
24956      (826, 910]
24957      (826, 910]
Name: MCPSetVoltage(V), Length: 24958, dtype: category
Categories (10, object): [(69.16, 154] < (154, 238] < (238, 322] < (322, 406] ... (574, 658] < (658, 742] < (742, 826] < (826, 910]]

In [ ]: