In [11]:
%matplotlib inline

In [23]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

In [7]:
df = pd.read_csv('spectral_irradiance.csv')

In [37]:
plt.style.use('ggplot'); plt.figure(figsize=(12,12))
plt.plot(df['Wavelength nm'].values,df['Wehrli W/m2/nm'].values, lw=0.9);



In [43]:
10e-2 / 1e-6


Out[43]:
100000.00000000001

In [41]:
total_energy = df[df.columns[1]].sum(axis=1)


---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-41-094729828745> in <module>()
----> 1 total_energy = df[df.columns[1]].sum(axis=1)

~/Miniconda3/envs/fastai/lib/python3.6/site-packages/pandas/core/generic.py in stat_func(self, axis, skipna, level, numeric_only, min_count, **kwargs)
   9589                                       skipna=skipna, min_count=min_count)
   9590         return self._reduce(f, name, axis=axis, skipna=skipna,
-> 9591                             numeric_only=numeric_only, min_count=min_count)
   9592 
   9593     return set_function_name(stat_func, name, cls)

~/Miniconda3/envs/fastai/lib/python3.6/site-packages/pandas/core/series.py in _reduce(self, op, name, axis, skipna, numeric_only, filter_type, **kwds)
   3214             # Validate that 'axis' is consistent with Series's single axis.
   3215             if axis is not None:
-> 3216                 self._get_axis_number(axis)
   3217             if numeric_only:
   3218                 raise NotImplementedError('Series.{0} does not implement '

~/Miniconda3/envs/fastai/lib/python3.6/site-packages/pandas/core/generic.py in _get_axis_number(self, axis)
    373                 pass
    374         raise ValueError('No axis named {0} for object type {1}'
--> 375                          .format(axis, type(self)))
    376 
    377     def _get_axis_name(self, axis):

ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'>

In [42]:
total_energy.sum(axis=0)


Out[42]:
834.3199999999999

In [ ]: