Question: Using a Pandas dataframe and the stats ols method, Im able to run a regression using the code 

```
import pandas as pd
from pandas.stats.api import ols
df = pd.DataFrame({"A": [56, 55, 57, 58, 56, 58, 59, 60, 63, 62, 63, 65, 66, 68], "B": [1,2,3,4,5,6,7,8,9,10,11,12,13,14]})
res = ols(y=df['A'], x=df[['B']])

```

However although this works

```
print res

```

Im trying to get just the fitted coefficient, and this does not work

```
print res.params

```

i get the error

```
AttributeError: 'OLS' object has no attribute 'params'

```

how can I access the parameters, I am particularly looking the extract the coefficient of the regression, that is all I am interested in.

Answer: 
If you only want to update the first object of the array not depending on condition this is your solution

```
Projects.update({_id: projectId},{$set : {"techInfo.equipInfo.0.quantity" : 1000000}})

```

If you want to traverse through the element find the array and update that,You can use this

```
Projects.update({_id: projectId,"techInfo.equipInfo" : {"$elemMatch" : {"type" : "module"}}},{$set : {"techInfo.equipInfo.$.quantity" : 1000000}})

```
This should work, The `{` before `$set` needs to be closed

```
Projects.update(
    {_id: projectId},
    {$set: {"techInfo.equipInfo.1.quantity": 1000000}}
);

```