class_docstr: Tests for reshaping and concatenation.
class_docstr_tok: ["Tests","for","reshaping","and","concatenation","."]
code: def test_concat_mixed_dtypes(self, data):
      # https://github.com/pandas-dev/pandas/issues/20762
      df1 = pd.DataFrame({"A": data[:3]})
      df2 = pd.DataFrame({"A": [1, 2, 3]})
      df3 = pd.DataFrame({"A": ["a", "b", "c"]}).astype("category")
      dfs = [df1, df2, df3]
  
      # dataframes
      result = pd.concat(dfs)
      expected = pd.concat([x.astype(object) for x in dfs])
      tm.assert_frame_equal(result, expected)
  
      # series
      result = pd.concat([x["A"] for x in dfs])
      expected = pd.concat([x["A"].astype(object) for x in dfs])
      tm.assert_series_equal(result, expected)
  
      # simple test for just EA and one other
      result = pd.concat([df1, df2.astype(object)])
      expected = pd.concat([df1.astype("object"), df2.astype("object")])
      tm.assert_frame_equal(result, expected)
  
      result = pd.concat([df1["A"], df2["A"].astype(object)])
      expected = pd.concat(
          [df1["A"].astype("object"), df2["A"].astype("object")]
      )
      tm.assert_series_equal(result, expected)
  
imports: import itertools
  import numpy
  import pytest
  import pandas
  import pandas._testing
  from pandas.api.extensions import ExtensionArray
  from pandas.core.internals.blocks import EABackedBlock
label_desc: Use image node_id 3 for calling the BaseReshapingTests obj's underlying member method code with example usage: obj.test_concat_mixed_dtypes(data) without return types