In-place modification of a Series is a slightly controversial topic. When possible, it is preferred to perform operations that return a new Series with the modifications represented in the new Series. But, if needed, it is possible to change values and add/remove rows in-place.
An additional row can be added in place to a series by assigning a value to an index label that does not already exist. The following code creates a Series object and adds an additional item to the series:
![](https://static.packt-cdn.com/products/9781787123137/graphics/assets/bcf30643-0d05-47ed-9da0-f3ed6a721aae.png)
![](https://static.packt-cdn.com/products/9781787123137/graphics/assets/9f3cb824-1c0f-4078-b010-5bf83eb36c18.png)
The value at a specific index label can be changed in place by assignment:
![](https://static.packt-cdn.com/products/9781787123137/graphics/assets/85953761-27b9-405a-820e-e0eb5ab9c866.png)
Rows can be removed from a Series by passing their index labels to the del() function. The following demonstrates removal of the row with the index label 'a':
![](https://static.packt-cdn.com/products/9781787123137/graphics/assets/ca80b49a-c30f-4e87-a0ec-eaf21f974fa5.png)
To add and remove items out of place, you use pd.concat() to add and remove using a Boolean selection.
An important thing to keep...