code: def test_decimal_convert_to_float_by_schema() -> None:
      # Column Based
      df = pl.DataFrame(
          {"a": [D("1"), D("2.55"), D("45.000"), D("10.0")]},
          schema={"a": pl.Float64},
      )
      expected = pl.DataFrame({"a": [1.0, 2.55, 45.0, 10.0]})
      assert_frame_equal(df, expected)
  
      # Row Based
      df = pl.DataFrame(
          [[D("1"), D("2.55"), D("45.000"), D("10.0")]],
          schema={"a": pl.Float64},
      )
      expected = pl.DataFrame({"a": [1.0, 2.55, 45.0, 10.0]})
      assert_frame_equal(df, expected)
  
imports: from __future__ import annotations
  import io
  import itertools
  from dataclasses import dataclass
  from decimal import Decimal
  from typing import Any, NamedTuple
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  import polars
  from polars.testing import assert_frame_equal
label_desc: Use image node_id 6 for calling a global function with example usage: test_decimal_convert_to_float_by_schema() without return types