class_docstr: Test Arrow charts.
class_docstr_tok: ["Test","Arrow","charts","."]
docstr: Test built-in charts drop columns that are not used.
docstr_tok: ["Test","built-in","charts","drop","columns","that","are","not","used","."]
code: def test_unused_columns_are_dropped(
      self, chart_command: Callable, altair_type: str
  ):
      """Test built-in charts drop columns that are not used."""
  
      df = pd.DataFrame(
          [[5, 10, 20, 30, 35, 40, 50, 60]],
          columns=["z", "a", "b", "c", "x", "d", "e", "f"],
      )
  
      if chart_command == st.scatter_chart:
          chart_command(df, x="a", y="c", color="d", size="e")
          EXPECTED_DATAFRAME = pd.DataFrame(
              [[10, 40, 50, 30]], columns=["a", "d", "e", "c"]
          )
      else:
          chart_command(df, x="a", y="c", color="d")
  
          EXPECTED_DATAFRAME = pd.DataFrame(
              [[10, 40, 30]], columns=["a", "d", "c"]
          )
  
      proto = (
          self.get_delta_from_queue().new_element.arrow_vega_lite_chart
      )
      json.loads(proto.spec)
  
      self.assert_output_df_is_correct_and_input_is_untouched(
          orig_df=df, expected_df=EXPECTED_DATAFRAME, chart_proto=proto
      )
  
imports: import json
  import unittest
  from datetime import date
  from functools import reduce
  from typing import Any, Callable
  import altair
  import pandas
  import pytest
  from packaging import version
  from parameterized import parameterized
  import streamlit
  from streamlit.elements import arrow_altair
  from streamlit.elements.arrow_altair import ChartType
  from streamlit.errors import StreamlitAPIException
  from streamlit.type_util import bytes_to_data_frame, is_pandas_version_less_than
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
  from tests.streamlit import pyspark_mocks, snowpark_mocks
label_desc: Use image node_id 18 for calling the ArrowChartsTest obj's underlying member method code with example usage: obj.test_unused_columns_are_dropped(chart_command, altair_type) without return types