-1
It’s giving a syntax error but I believe that’s not it, but I can not identify what’s wrong:
```python
#retorno
df = carteira.copy()
df = df.reset_index()
colunas = df.columns
columns = list(colunas[1:])
df_rent = df(['Date'])
n = len(df_rent)
for coluna in colunas:
data = [0]
for idx,val in df.iterrows():
if idx > 0:
R = math.log(df.loc[idx,coluna] / (df.loc[idx-1,coluna])
data.append(R)
df_rent[coluna] = data
```
> File "<ipython-input-109-818eeabca8c6>", line 17
data.append(R)
^
SyntaxError: invalid syntax