-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: Add check for character limmit #57103
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
Changes from all commits
20e357a
74e302f
74f4f81
d864912
babdf29
4768089
65284bb
41cad2b
5470464
2e79c61
91a4bee
62b8b54
bd6a975
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1385,6 +1385,18 @@ def test_to_excel_empty_frame(self, engine, ext): | |
expected = DataFrame() | ||
tm.assert_frame_equal(result, expected) | ||
|
||
def test_to_excel_raising_warning_when_cell_character_exceed_limit( | ||
self, path, engine | ||
): | ||
# GH#56954 | ||
df = DataFrame({"A": ["a" * 32768]}) | ||
msg = "Cell contents too long, truncated to 32767 characters" | ||
with tm.assert_produces_warning( | ||
UserWarning, match=msg, raise_on_extra_warnings=False | ||
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. What extra warning is raised here? 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. From commit babdf29, the check https://github.com/pandas-dev/pandas/actions/runs/7678882560/job/20929191559 rise and check https://github.com/pandas-dev/pandas/actions/runs/7678882560/job/20929192274 rasie
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. Gotcha. Yeah since these are external warnings this is fine for now |
||
): | ||
buf = BytesIO() | ||
df.to_excel(buf) | ||
|
||
|
||
class TestExcelWriterEngineTests: | ||
@pytest.mark.parametrize( | ||
|
Uh oh!
There was an error while loading. Please reload this page.