-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Fix FloatingArray output formatting #36800
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
ca6c979
adcc26c
4663e10
406ed4d
a1228c9
04f4be8
77b88fc
8743b5b
a235611
d775c33
00c15ba
06ef337
aedd7ab
32264e9
ba3ac46
f8a3216
546b44e
99d6905
319529f
f65bcfe
7a477dc
13567f8
253c94e
2136494
7d4452a
80b0103
faa053f
8fd5a9f
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 |
---|---|---|
|
@@ -3439,3 +3439,25 @@ def test_to_string_complex_number_trims_zeros(): | |
result = s.to_string() | ||
expected = "0 1.00+1.00j\n1 1.00+1.00j\n2 1.05+1.00j" | ||
assert result == expected | ||
|
||
|
||
def test_nullable_float_to_string(float_ea_dtype): | ||
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. i think should move these to EA tests and try to do these generically (for all of the numberic types); i guess ok here as well (but group them together int. & float both with and w/o nulls) 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. do we have int nullable tests for formatting? 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. Not as far as I can tell, entirely possible I'm just missing them 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. kk can you add (this PR would be great) 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. Done. These tests could probably be cleaned up a bit also, this file is very big and testing lots of different things. 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. oh yes, for sure. if you'd create an issue would be great. |
||
# https://github.com/pandas-dev/pandas/issues/36775 | ||
dtype = float_ea_dtype | ||
s = pd.Series([0.0, 1.0, None], dtype=dtype) | ||
result = s.to_string() | ||
expected = """0 0.0 | ||
1 1.0 | ||
2 <NA>""" | ||
assert result == expected | ||
|
||
|
||
def test_nullable_int_to_string(any_nullable_int_dtype): | ||
# https://github.com/pandas-dev/pandas/issues/36775 | ||
dtype = any_nullable_int_dtype | ||
s = pd.Series([0, 1, None], dtype=dtype) | ||
result = s.to_string() | ||
expected = """0 0 | ||
1 1 | ||
2 <NA>""" | ||
assert result == expected |
Uh oh!
There was an error while loading. Please reload this page.