QST: Integrate a function with pandas and scipy.integrate.quad
I'm trying to integrate a function with pandas and scipy in the most elegant way possible, but I'm getting the following error when executing:

TypeError: 'float' object is not subscriptable

This is a preview of the data set:

```
           0       1    Live  time:  11646
0        1.0     2.0     0.0    0.0    0.0
1        2.0     3.0     0.0    0.0    0.0
2        3.0     4.0     0.0    0.0    0.0
3        4.0     5.0     1.0    0.0    0.0
4        5.0     6.0     2.0    0.0    0.0
...      ...     ...     ...    ...    ...
4094  4095.0  4096.0  4092.0    1.0    0.0
4095  4096.0  4097.0  4093.0    0.0    0.0
4096  4097.0  4098.0  4094.0    1.0    0.0
4097  4098.0  4099.0  4095.0    2.0    0.0
4098  4099.0  4100.0  4096.0    0.0    0.0
```
I know there are other ways to solve the problem, but I would like to keep the lambda function, because it makes things simpler.

Code:

```
import pandas as pd
import pylab as plt
import numpy as np
from scipy.integrate import quad

dados = pd.read_csv('data.csv', sep=',| |\t|\s+', engine='python')
dados = dados.apply(pd.to_numeric,errors='coerce').fillna(0).astype('float')

def func(x):
    return x[3]/x[3].max()

dados['I'] = dados.apply(lambda x: quad(func, 140.0, 4000.0), axis=1)
```
CSV file:

[data.txt](https://github.com/pandas-dev/pandas/files/4705783/data.txt)
