BUG: extra leading space in to_string when index=False#36094
BUG: extra leading space in to_string when index=False#36094jreback merged 6 commits intopandas-dev:masterfrom
Conversation
There was a problem hiding this comment.
@onshek nice! this probably needs to be moved to 1.2 whatsnew note?
done |
jreback
left a comment
There was a problem hiding this comment.
lgtm. ping on green.
@charlesdong1991 if any comments.
charlesdong1991
left a comment
There was a problem hiding this comment.
@onshek since the default has changed from None to True, maybe nicer to update the docstring a bit as well, something like?
# current doc
leading_space : bool, optional
# suggested?
leading_space : bool, optional, default is True
Sure, working on it. |
|
@jreback @charlesdong1991 Done. Thanks for your reviews :) |
jreback
left a comment
There was a problem hiding this comment.
small comment, ping on green.
| Strings | ||
| ^^^^^^^ | ||
|
|
||
| - Bug in :meth:`Series.to_string` adding a leading space when ``index=False`` (:issue:`24980`) |
There was a problem hiding this comment.
can you also that this would affect DataFrame.to_latex and DataFrame.to_string
There was a problem hiding this comment.
can you also that this would affect
DataFrame.to_latexandDataFrame.to_string
"also" waht? Do you mean give a mark here like:
Bug in :meth:Series.to_string adding a leading space when index=False and this would affect DataFrame.to_latex and DataFrame.to_string (:issue:24980)
There was a problem hiding this comment.
| - Bug in :meth:`Series.to_string` adding a leading space when ``index=False`` (:issue:`24980`) | |
| - Bug in :meth:`Series.to_string`, :meth:`DataFrame.to_string`, and :meth:`DataFrame.to_latex` adding a leading space when ``index=False`` (:issue:`24980`) |
ping if you could make this change.
|
thanks @onshek very nice! |
black pandasgit diff upstream/master -u -- "*.py" | flake8 --diffThis PR is mainly from #29670 contributed by @charlesdong1991, and I made a few changes on his work.
The code have passed all tests modified and added in
test_format.pyandtest_to_latex.py.Any comment is welcomed!