We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
import pandas as pd d = {'col1': ["1", "2", "3"], 'col2': [4, 5, 6]} df = pd.DataFrame(d) print(df.to_string(index=False, formatters={'col1':'{:10}'.format}))
there is a white space in the head of every line: col1 col2 1 4 2 5 3 6
no white space in the head col1 col2 1 4 2 5 3 6
pd.show_versions()
The text was updated successfully, but these errors were encountered:
try this. documentation
print(df.to_string(index=False, formatters={'col1':'{:10}'.format}, justify="left"))
Sorry, something went wrong.
Duplicate of #24980 I think.
No branches or pull requests
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
there is a white space in the head of every line:
col1 col2
1 4
2 5
3 6
Expected Output
no white space in the head
col1 col2
1 4
2 5
3 6
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: