class_docstr: Test Arrow charts.
class_docstr_tok: ["Test","Arrow","charts","."]
docstr: Test support for explicit wide-format tables (i.e. y is a sequence).
docstr_tok: ["Test","support","for","explicit","wide-format","tables","(","i.e",".","y","is","a","sequence",")","."]
code: def test_chart_with_explicit_x_and_y_sequence(
      self, chart_command: Callable, altair_type: str
  ):
      """Test support for explicit wide-format tables (i.e. y is a sequence)."""
      df = pd.DataFrame(
          [[20, 30, 50, 60]], columns=["a", "b", "c", "d"]
      )
      EXPECTED_DATAFRAME = pd.DataFrame(
          [[20, "b", 30], [20, "c", 50]],
          columns=[
              "a",
              "color--p5bJXXpQgvPz6yvQMFiy",
              "value--p5bJXXpQgvPz6yvQMFiy",
          ],
      )
  
      chart_command(df, x="a", y=["b", "c"])
  
      proto = (
          self.get_delta_from_queue().new_element.arrow_vega_lite_chart
      )
      chart_spec = json.loads(proto.spec)
  
      self.assertIn(
          chart_spec["mark"], [altair_type, {"type": altair_type}]
      )
      self.assertEqual(chart_spec["encoding"]["x"]["field"], "a")
      self.assertEqual(
          chart_spec["encoding"]["y"]["field"],
          "value--p5bJXXpQgvPz6yvQMFiy",
      )
      self.assertEqual(
          chart_spec["encoding"]["color"]["field"],
          "color--p5bJXXpQgvPz6yvQMFiy",
      )
  
      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 9 for calling the ArrowChartsTest obj's underlying member method code with example usage: obj.test_chart_with_explicit_x_and_y_sequence(chart_command, altair_type) without return types