@@ -1438,7 +1438,7 @@ def get_header_style(self) -> str:
14381438
14391439def test_html_formatter_memory (df , clean_formatter_state ):
14401440 """Test the memory and row control parameters in DataFrameHtmlFormatter."""
1441- configure_formatter (max_memory_bytes = 10 , min_rows_display = 1 )
1441+ configure_formatter (max_memory_bytes = 10 , min_rows = 1 )
14421442 html_output = df ._repr_html_ ()
14431443
14441444 # Count the number of table rows in the output
@@ -1448,7 +1448,7 @@ def test_html_formatter_memory(df, clean_formatter_state):
14481448 assert tr_count == 2 # 1 for header row, 1 for data row
14491449 assert "data truncated" in html_output .lower ()
14501450
1451- configure_formatter (max_memory_bytes = 10 * MB , min_rows_display = 1 )
1451+ configure_formatter (max_memory_bytes = 10 * MB , min_rows = 1 )
14521452 html_output = df ._repr_html_ ()
14531453 # With larger memory limit and min_rows=2, should display all rows
14541454 tr_count = count_table_rows (html_output )
@@ -1468,55 +1468,55 @@ def test_html_formatter_memory_boundary_conditions(df, clean_formatter_state):
14681468
14691469 # Get the raw size of the data to test boundary conditions
14701470 # First, capture output with no limits
1471- configure_formatter (max_memory_bytes = 10 * MB , min_rows_display = 1 , max_rows = 100 )
1471+ configure_formatter (max_memory_bytes = 10 * MB , min_rows = 1 , max_rows = 100 )
14721472 unrestricted_output = df ._repr_html_ ()
14731473 unrestricted_rows = count_table_rows (unrestricted_output )
14741474
14751475 # Test 1: Very small memory limit should still respect min_rows
1476- configure_formatter (max_memory_bytes = 10 , min_rows_display = 1 )
1476+ configure_formatter (max_memory_bytes = 10 , min_rows = 1 )
14771477 html_output = df ._repr_html_ ()
14781478 tr_count = count_table_rows (html_output )
14791479 assert tr_count >= 2 # At least header + 1 data row (minimum)
14801480 # Should show truncation since we limited memory so aggressively
14811481 assert "data truncated" in html_output .lower ()
14821482
14831483 # Test 2: Memory limit at default size should work well
1484- configure_formatter (max_memory_bytes = 2 * MB , min_rows_display = 1 )
1484+ configure_formatter (max_memory_bytes = 2 * MB , min_rows = 1 )
14851485 html_output = df ._repr_html_ ()
14861486 tr_count = count_table_rows (html_output )
14871487 assert tr_count >= 2 # At least header + min_rows
14881488
14891489 # Test 3: Very large memory limit should show all data
1490- configure_formatter (max_memory_bytes = 100 * MB , min_rows_display = 1 )
1490+ configure_formatter (max_memory_bytes = 100 * MB , min_rows = 1 )
14911491 html_output = df ._repr_html_ ()
14921492 tr_count = count_table_rows (html_output )
14931493 assert tr_count == unrestricted_rows # Should show all rows
14941494
14951495 # Test 4: Min rows should override memory limit
14961496 # With tiny memory and larger min_rows, min_rows should win
1497- configure_formatter (max_memory_bytes = 10 , min_rows_display = 2 )
1497+ configure_formatter (max_memory_bytes = 10 , min_rows = 2 )
14981498 html_output = df ._repr_html_ ()
14991499 tr_count = count_table_rows (html_output )
15001500 assert tr_count >= 3 # At least header + 2 data rows (min_rows)
15011501 # Should show truncation message despite min_rows being satisfied
15021502 assert "data truncated" in html_output .lower ()
15031503
15041504 # Test 5: Default memory limit with different min_rows
1505- configure_formatter (max_memory_bytes = 2 * MB , min_rows_display = 2 , max_rows = 2 )
1505+ configure_formatter (max_memory_bytes = 2 * MB , min_rows = 2 , max_rows = 2 )
15061506 html_output = df ._repr_html_ ()
15071507 tr_count = count_table_rows (html_output )
15081508 assert tr_count == 3 # header + 2 data rows
15091509
15101510
15111511def test_html_formatter_max_rows (df , clean_formatter_state ):
1512- configure_formatter (min_rows_display = 2 , max_rows = 2 )
1512+ configure_formatter (min_rows = 2 , max_rows = 2 )
15131513 html_output = df ._repr_html_ ()
15141514
15151515 tr_count = count_table_rows (html_output )
15161516 # Table should have header row (1) + 2 data rows = 3 rows
15171517 assert tr_count == 3
15181518
1519- configure_formatter (min_rows_display = 2 , max_rows = 3 )
1519+ configure_formatter (min_rows = 2 , max_rows = 3 )
15201520 html_output = df ._repr_html_ ()
15211521
15221522 tr_count = count_table_rows (html_output )
@@ -1542,11 +1542,11 @@ def test_html_formatter_validation():
15421542 with pytest .raises (ValueError , match = "max_memory_bytes must be a positive integer" ):
15431543 DataFrameHtmlFormatter (max_memory_bytes = - 100 )
15441544
1545- with pytest .raises (ValueError , match = "min_rows_display must be a positive integer" ):
1546- DataFrameHtmlFormatter (min_rows_display = 0 )
1545+ with pytest .raises (ValueError , match = "min_rows must be a positive integer" ):
1546+ DataFrameHtmlFormatter (min_rows = 0 )
15471547
1548- with pytest .raises (ValueError , match = "min_rows_display must be a positive integer" ):
1549- DataFrameHtmlFormatter (min_rows_display = - 5 )
1548+ with pytest .raises (ValueError , match = "min_rows must be a positive integer" ):
1549+ DataFrameHtmlFormatter (min_rows = - 5 )
15501550
15511551 with pytest .raises (ValueError , match = "max_rows must be a positive integer" ):
15521552 DataFrameHtmlFormatter (max_rows = 0 )
@@ -1555,16 +1555,16 @@ def test_html_formatter_validation():
15551555 DataFrameHtmlFormatter (max_rows = - 10 )
15561556
15571557 with pytest .raises (
1558- ValueError , match = "min_rows_display must be less than or equal to max_rows"
1558+ ValueError , match = "min_rows must be less than or equal to max_rows"
15591559 ):
1560- DataFrameHtmlFormatter (min_rows_display = 5 , max_rows = 4 )
1560+ DataFrameHtmlFormatter (min_rows = 5 , max_rows = 4 )
15611561
15621562
15631563def test_repr_rows_backward_compatibility (clean_formatter_state ):
15641564 """Test that repr_rows parameter still works as deprecated alias."""
15651565 # Should work when not conflicting with max_rows
15661566 with pytest .warns (DeprecationWarning , match = "repr_rows parameter is deprecated" ):
1567- formatter = DataFrameHtmlFormatter (repr_rows = 15 , min_rows_display = 10 )
1567+ formatter = DataFrameHtmlFormatter (repr_rows = 15 , min_rows = 10 )
15681568 assert formatter .max_rows == 15
15691569 assert formatter .repr_rows == 15
15701570
@@ -1589,7 +1589,7 @@ def test_configure_formatter(df, clean_formatter_state):
15891589 max_width = 500
15901590 max_height = 30
15911591 max_memory_bytes = 3 * MB
1592- min_rows_display = 2
1592+ min_rows = 2
15931593 max_rows = 2
15941594 enable_cell_expansion = False
15951595 show_truncation_message = False
@@ -1602,7 +1602,7 @@ def test_configure_formatter(df, clean_formatter_state):
16021602 assert formatter_default .max_width != max_width
16031603 assert formatter_default .max_height != max_height
16041604 assert formatter_default .max_memory_bytes != max_memory_bytes
1605- assert formatter_default .min_rows_display != min_rows_display
1605+ assert formatter_default .min_rows != min_rows
16061606 assert formatter_default .max_rows != max_rows
16071607 assert formatter_default .enable_cell_expansion != enable_cell_expansion
16081608 assert formatter_default .show_truncation_message != show_truncation_message
@@ -1614,7 +1614,7 @@ def test_configure_formatter(df, clean_formatter_state):
16141614 max_width = max_width ,
16151615 max_height = max_height ,
16161616 max_memory_bytes = max_memory_bytes ,
1617- min_rows_display = min_rows_display ,
1617+ min_rows = min_rows ,
16181618 max_rows = max_rows ,
16191619 enable_cell_expansion = enable_cell_expansion ,
16201620 show_truncation_message = show_truncation_message ,
@@ -1625,7 +1625,7 @@ def test_configure_formatter(df, clean_formatter_state):
16251625 assert formatter_custom .max_width == max_width
16261626 assert formatter_custom .max_height == max_height
16271627 assert formatter_custom .max_memory_bytes == max_memory_bytes
1628- assert formatter_custom .min_rows_display == min_rows_display
1628+ assert formatter_custom .min_rows == min_rows
16291629 assert formatter_custom .max_rows == max_rows
16301630 assert formatter_custom .enable_cell_expansion == enable_cell_expansion
16311631 assert formatter_custom .show_truncation_message == show_truncation_message
0 commit comments