We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e19847 commit 9f55723Copy full SHA for 9f55723
pandas/tests/io/formats/test_format.py
@@ -371,17 +371,17 @@ def test_repr_min_rows(self):
371
@pytest.mark.parametrize(
372
"data, format_option, expected_values",
373
[
374
- ({"A": [12345.6789]}, "{:12.3f}", "12345.679"),
375
- ({"A": [None]}, "{:.3f}", "None"),
376
- ({"A": [""]}, "{:.2f}", ""),
377
- ({"A": [112345.6789]}, "{:6.3f}", "112345.679"),
+ (12345.6789, "{:12.3f}", "12345.679"),
+ (None, "{:.3f}", "None"),
+ ("", "{:.2f}", ""),
+ (112345.6789, "{:6.3f}", "112345.679"),
378
],
379
)
380
def test_repr_float_formatting_html_output(
381
self, data, format_option, expected_values
382
):
383
with option_context("display.float_format", format_option.format):
384
- df = DataFrame(data)
+ df = DataFrame({"A": [data]})
385
html_output = df._repr_html_()
386
assert expected_values in html_output
387
0 commit comments