Consider the Series data2:
data2.head()
0 20075E,
1 20109C,
2 202217,
3 20219E,
4 20217C,
Name: 0, dtype: object
The code:
data3 = data2.str.slice(0,5)
data3.head()
Works just fine, and produces:
0 20075
1 20109
2 20221
3 20219
4 20217
Name: 0, dtype: object
But running
data3 = data2.str.slice(0,-1)
Appears to do nothing. Why?