-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
To string with encoding #28951
New issue
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
Merged
WillAyd
merged 32 commits into
pandas-dev:master
from
mohitanand001:to_string_with_encoding
Oct 23, 2019
Merged
To string with encoding #28951
Changes from 11 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
ae76e46
Added code in core/frame.py to include encoding in to_string
3985040
Modified io/formats/format.py to include encoding parameter in to_strin
8eea18e
Added encoding to pandas/core/format.py for to_string
d2c70ee
Changed formatting with black
mohitanand001 835b22d
Added test for to_string encoding
mohitanand001 4e30d7c
Removed spaces from test_to_string.py file
mohitanand001 78ba34b
Added whatsnew for to_string with encoding param.
mohitanand001 56fdad9
Modified whatsnew with to_string encoding note in Others section.
mohitanand001 83ccffd
Modified func to meth in for to_string note added in whatsnew.
mohitanand001 19801bb
Added full stop at end of line in to_string docstring.
mohitanand001 d44afa7
Moved whatsnew note from Other to Other enhancements section.
mohitanand001 b4b983b
Added annotation to encoding parameter in to_string in pandas/core/fr…
mohitanand001 acb2c6e
Merge branch 'master' into to_string_with_encoding
mohitanand001 236db38
Added encoding in test_format.py and removed test_to_string.py
mohitanand001 93e8b11
Merge branch 'to_string_with_encoding' of https://github.com/farzieng…
mohitanand001 1f3e55d
Added encoding in pytest parameter in test_format.py
mohitanand001 b0364d2
Fixed encoding paramter placement in test_format.py
mohitanand001 12ddc8f
Added test to check if encoding is present and filepath is not string…
mohitanand001 f82fe78
Added pytest.raises instead of assert.
mohitanand001 5ef9cec
Fix pytest.raise for test_format.py
mohitanand001 df58c1f
If encoding is specified and buf is not file, raise ValueError.
mohitanand001 496f68f
Fix pytest.raise in test_filepath_or_buffer_arg.
mohitanand001 725b2ec
Reformatted with black.
mohitanand001 698d3b7
Raise ValueError in to_html, to_latex, and to_string if buf is a buff…
mohitanand001 96cc810
ValueError placement fixed in formats.py
mohitanand001 1a35eeb
Removed commented code from format.py
mohitanand001 f865ac3
Removed commented code from format.py
mohitanand001 757a1f5
Merge branch 'to_string_with_encoding' of https://github.com/farzieng…
mohitanand001 835cdb8
Added encoding in assert_filepath_or_buffer_equals fixture.
mohitanand001 648fa55
Modified test_filepath_or_buffer_arg to have custom data(removed floa…
mohitanand001 3698a2a
Modified test_filepath_or_buffer_arg to have custom data(removed floa…
mohitanand001 f8917de
Merge branch 'to_string_with_encoding' of https://github.com/farzieng…
mohitanand001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
def test_to_string_encoding(float_frame,): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these are all test_to_format.py, pls move there would take a followup to split up test_to_format into 2 parts though (e.g. move the to_string out to a separate file) |
||
# GH 28766 | ||
path = "test_to_string_file" | ||
float_frame.to_string(path, encoding="gbk") | ||
with open(str(path), "r", encoding="gbk") as f: | ||
assert float_frame.to_string() == f.read() |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.