Question: I want to filter my `List` and if an `item` *already exists*, I don't want to add that `item` to that `List`. That's why I try to filter by the `item` property. 

```
if(!(PolyLineList.Contains(PolyLineList.Find(x => x.item == item))))
{
    cPolyline currentPolyLine = new cPolyline(pointlist,item);
    PolyLineList.Add(currentPolyLine);
}

```

When an `item` *already exists* in `PolyLineList`, that is equal to `item`, it should *skip* the `if`-statement.

Answer: 
It is possible, by `inplace=True`:

```
for ser in ser_list:
    ser.replace({65: 10, 62: 20}, inplace=True)

print (ser_list)
[0    10
1     1
2     0
3     0
4     1
dtype: int64, 0     0
1    20
2     1
3     1
4     0
dtype: int64]

```

But not recommended like mentioned @Dan in comments - [link](https://www.dataschool.io/future-of-pandas/#inplace):

> 
> The pandas core team discourages the use of the **inplace** parameter, and eventually it will be deprecated (which means "scheduled for removal from the library"). Here's why:
> 
> 
> **inplace** won't work within a method chain.  
> 
> The use of **inplace** often doesn't prevent copies from being created, contrary to what the name implies.  
> 
> Removing the **inplace** option would reduce the complexity of the pandas codebase.
> 
> 
> 

Or assign to same variable in list comprehension:

```
ser_list = [ser.replace({65: 10, 62: 20}) for ser in ser_list]

```

Loop solution is possible with append to new list and assign back:

```
out = []
for ser in ser_list:
    ser = ser.replace({65: 10, 62: 20})
    out.append(ser)

print (out)
[0    10
1     1
2     0
3     0
4     1
dtype: int64, 0     0
1    20
2     1
3     1
4     0
dtype: int64]

```
We can also use `Series.map` with `fillna` and `list comprehension`:

```
new = [ser.map({65: 10, 62: 20}).fillna(ser) for ser in ser_list]

print(new)
[0    10.0
1     1.0
2     0.0
3     0.0
4     1.0
dtype: float64, 0     0.0
1    20.0
2     1.0
3     1.0
4     0.0
dtype: float64]

```