I want to strip the spaces across my pandas data frame . I am using the following code for my data frame d1 .
cols = df1.select_dtypes(object).columns df1[cols] = df1