fix for the issue-11833
updated the to_string() function of  DataFrameFormatter(TableFormatter) class ,in format.py file, of the core directory

Closes https://github.com/pydata/pandas/issues/11833

needs tests
 @jreback   so how should I push the commit?

I believe it works and solves the issue
 just push
nothing special 
 @jreback  it shows that the commit fails the check, but it solves the issue mentioned??
can you review the commit ?
 you need to have it pass all existing and any new tests
 @Vutsuak16 The problem is that you _also_ need to change the test that fails. As we are changing the behaviour here (it was explicitly tested that there were blank spaces, which we now want to remove)
