I have a dataframe with multiple columns. I want to assign a priority to each row. 
This priority will be given based on the data in the other columns. 

I have defined a priority function

```
def priority(Bcat,Brand,IPC,Customer, Type):
    p=1
    if Bcat != "*":
        p+= len(Bcat)/3
    if Brand != "*":
        p+= 2
    if IPC != "*":
        p+= 4
    if Customer != "*" & Customer != "REPLCUST":
        p+= 8
    if Type == "Default":
        p+= -16
    return p

```

And I want now to apply it to my dataframe.

This is what my dataframe looks like (2500 lines):

```
Bcat Brand Customer   IPC   LOC MKT_BUD      Type   STARTEFF    Value
A    B     C          D      E   F            1     2001-01-01    1.0

```

I am trying this but it does not work

```
df["Priority"] = df[["Bcat","Brand","IPC","Customer","Type"]].apply(priority,axis=1,args=("Bcat","Brand","IPC","Customer","Type"))

```

and I get this message

```
TypeError: ('priority() takes 5 positional arguments but 6 were given', 'occurred at index 0')

```

And also tried this

```
df["Priority"] = np.vectorize(priority(df.Bcat,df.Brand,df.IPC,df.Customer,df.Type))

```

and got this message

```
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

```