Hello I´m trying to get the previous value in an specific column if this valuecontains "-":

this is my code:

```
count=-1
for i, row in df1.iterrows():
    count=count + 1
    if row["SUBCAPITULO"]== " "and count>0 and "-" in df1.loc[count-1:"SUBCAPITULO"]:
        row["SUBCAPITULO"]= df1.loc[count-1:"SUBCAPITULO"]

```

[![enter image description here](https://i.stack.imgur.com/s7mNr.png)](https://i.stack.imgur.com/s7mNr.png)