Skip to content

Conversation

@phofl
Copy link
Member

@phofl phofl commented Jun 20, 2022

I stumbled across this myself a few days ago. I think this would help

@phofl phofl added Docs IO CSV read_csv, to_csv labels Jun 20, 2022
float_format : str, default None
Format string for floating point numbers.
Format string for floating point numbers. If a format is given, it takes
precedence over other numeric formatting parameters, like decimal.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if we have a unit test for this behavior?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Point. I'll check. If not, I'll add my use case that showed this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for asking, I forgot something yesterday. This is only true if you pass a Callable, which is supported but was not documented

@mroeschke mroeschke added this to the 1.5 milestone Jun 21, 2022
@mroeschke mroeschke merged commit e63885f into pandas-dev:main Jun 21, 2022
@mroeschke
Copy link
Member

Thanks @phofl

@phofl phofl deleted the doc_to_csv branch June 21, 2022 22:01
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
* DOC: clarify to_csv float format docstring

* Clarify doc

* Clarify doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs IO CSV read_csv, to_csv

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants