class_docstr: Test ability to marshall arrow protos.
class_docstr_tok: ["Test","ability","to","marshall","arrow","protos","."]
docstr: Test that an exception is thrown if the dataframe exceeds the styler.render.max_elements config.
docstr_tok: ["Test","that","an","exception","is","thrown","if","the","dataframe","exceeds","the","styler.render.max_elements","config","."]
code: def test_throw_exception_if_data_exceeds_styler_config(self):
      """Test that an exception is thrown if the dataframe exceeds the styler.render.max_elements config."""
      pd.set_option("styler.render.max_elements", 5000)
      # big example with default styler.render.max_elements
      df = pd.DataFrame(list(range(5001)))
      with self.assertRaises(StreamlitAPIException):
          st.dataframe(df.style.format("{:03d}"))
      pd.reset_option("styler.render.max_elements")
  
imports: import json
  from unittest.mock import MagicMock, patch
  import numpy
  import pandas
  import pyarrow
  import pytest
  from pandas.io.formats.style_render import StylerRenderer
  import streamlit
  from streamlit.elements.lib.column_config_utils import INDEX_IDENTIFIER
  from streamlit.errors import StreamlitAPIException
  from streamlit.type_util import bytes_to_data_frame, pyarrow_table_to_bytes
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
  from tests.testutil import create_snowpark_session
label_desc: Use image node_id 11 for calling the ArrowDataFrameProtoTest obj's underlying member method code with example usage: obj.test_throw_exception_if_data_exceeds_styler_config() without return types