Using Pandas, how do I strip part of a cell from an Excel file? Thanks in advance, I have been struggling with this for a couple of hours now. I have a column named 'CaseNumber'.  the data in that column is structured as 'Case ID Number - 00123456'.

I am trying to create a loop that will go through the entire sheet and strip 'Case ID Number - 00'. So the final output would just be the 6 digit number set. 

So far I have found the attribute .strip('Case ID Number - 00') but I cannot find the logic to create the for loop.  

I appreciate any insight.
String operations on particular columns (or series) can be done by appending .str to the series. You can use the following command to get your output:

&gt;&gt;&gt; df['Case Number'].str.strip('Case ID Number - 00')


You can refer to the documentation here Working with text.