class_docstr: Test cases for "small data" conversion and I/O.
code: def test_to_excel(self):
      with self.temp_dir() as dirpath:
          pandas_location = dirpath + "/" + "output1.xlsx"
          pandas_on_spark_location = dirpath + "/" + "output2.xlsx"
  
          pdf = self.pdf
          psdf = self.psdf
          psdf.to_excel(pandas_on_spark_location)
          pdf.to_excel(pandas_location)
          dataframes = self.get_excel_dfs(
              pandas_on_spark_location, pandas_location
          )
          self.assert_eq(dataframes["got"], dataframes["expected"])
  
          psdf.a.to_excel(pandas_on_spark_location)
          pdf.a.to_excel(pandas_location)
          dataframes = self.get_excel_dfs(
              pandas_on_spark_location, pandas_location
          )
          self.assert_eq(dataframes["got"], dataframes["expected"])
  
          pdf = pd.DataFrame(
              {"a": [1, None, 3], "b": ["one", "two", None]},
              index=[0, 1, 3],
          )
  
          psdf = ps.from_pandas(pdf)
  
          psdf.to_excel(pandas_on_spark_location, na_rep="null")
          pdf.to_excel(pandas_location, na_rep="null")
          dataframes = self.get_excel_dfs(
              pandas_on_spark_location, pandas_location
          )
          self.assert_eq(dataframes["got"], dataframes["expected"])
  
          pdf = pd.DataFrame(
              {"a": [1.0, 2.0, 3.0], "b": [4.0, 5.0, 6.0]},
              index=[0, 1, 3],
          )
  
          psdf = ps.from_pandas(pdf)
  
          psdf.to_excel(pandas_on_spark_location, float_format="%.1f")
          pdf.to_excel(pandas_location, float_format="%.1f")
          dataframes = self.get_excel_dfs(
              pandas_on_spark_location, pandas_location
          )
          self.assert_eq(dataframes["got"], dataframes["expected"])
  
          psdf.to_excel(pandas_on_spark_location, header=False)
          pdf.to_excel(pandas_location, header=False)
          dataframes = self.get_excel_dfs(
              pandas_on_spark_location, pandas_location
          )
          self.assert_eq(dataframes["got"], dataframes["expected"])
  
          psdf.to_excel(pandas_on_spark_location, index=False)
          pdf.to_excel(pandas_location, index=False)
          dataframes = self.get_excel_dfs(
              pandas_on_spark_location, pandas_location
          )
          self.assert_eq(dataframes["got"], dataframes["expected"])
  
imports: import os
  import string
  import unittest
  import sys
  import numpy
  import pandas
  from pyspark import pandas
  from pyspark.testing.pandasutils import PandasOnSparkTestCase, TestUtils
  from pyspark.testing.sqlutils import SQLTestUtils
label_desc: Use image node_id 6 for calling the DataFrameConversionMixin obj's underlying member method code with example usage: obj.test_to_excel() without return types