import pandas as pd
df=pd.read_excel('test.xlsx')
ab= df.MobileNum.str.replace(' ','')
print ab
As in the screenshot you can see first four row shows nan which is my 10 digit original number without space and other has spaces . so i want to show first four row data with this result.