I have recently been made aware of the dangers of chained assignment, and I am trying to use the proper method of indexing in pandas using loc[rowindex, colindex]. I am working with mixed data types (mix within the same series of np.float64 and list and string) - this is unavoidable. I have an integer index

I am running the following loop through a data frame

```
Count = 0
for row in DF.index:
print row
    if '/' in str(DF.order_no[row]) and '/' not in str(DF.buyer[row]) and '/' not in    str(DF.buyer[row])\
    and '/' not in str(DF.smv[row]) and '/' not in str(DF.item[row]):
        DF.loc[row, 'order_no'] = str(DF.loc[row, 'order_no']).split('/')
        Count +=1

```

Count 

Which returns the error:

```
 TypeError: object of type 'int' has no len()

```

What am I doing wrong?

Within that loop I can do:

```
print DF.loc[row, 'order_no']

```

and

```
print DF.loc[row, 'order_no'] == str(DF.loc[row, order_no]).split('/')

```

but not

```
DF.loc[row, 'order_no'] = str(DF.loc[row, order_no]).split('/')

```

Using the print statement I see that it gets stuck on row 3, yet:

```
DF.loc[3, 'order_no']

```

works just fine. 

Help apprecitated.

EDIT

A workaround is the following:

```
Count = 0
Vals = []
Ind = []
for row in DF.index:
    if '/' in str(DF.order_no[row]) and '/' not in str(DF.buyer[row]) and '/' not in str(DF.buyer[row])\
    and '/' not in str(DF.smv[row]) and '/' not in str(DF.item[row]):
        Vals.append(DF.order_no[row].split('/'))
        Ind.append(row)
        Count +=1

DF.loc[Ind, 'order_no'] = Vals    

```

In other words I can create a list of the values to be modified and then change them using .loc. This works fine which leads me to believge that the issue is not with the values I am tryng to assign, and with the assignment process itself.

Here is an example of the type of data I am working on: The code fails on row 3 and 9 as far as i can tell. Sorry its in csv format, but this is how I am reading it into pandas.

<https://www.dropbox.com/s/zuy8pj15nlhmcfb/EG2.csv>

Using that data if the following is done:

```
EG = pd.reas_csv('EG.csv')
EG.loc[3, 'order_no'] = str(EG.loc[3, 'order_no']).split('/')

```

Fails with the error

`object of type 'int' has no len()`

But

```
EG['order_no'][3] = str(EG.loc[3, 'order_no']).split('/')

```

works fine, but this is the type of chain assignment I am trying to avoid as it was giving me issues elsewhere.

which is why I thought this was just a syntax error.

Sorry for this now unweildy question