diff --git a/bigframes/core/local_data.py b/bigframes/core/local_data.py index 958113dda3..c214d0bb7e 100644 --- a/bigframes/core/local_data.py +++ b/bigframes/core/local_data.py @@ -277,7 +277,10 @@ def _adapt_pandas_series( ) return pa.array(series, type=pa.string()), bigframes.dtypes.GEO_DTYPE try: - return _adapt_arrow_array(pa.array(series)) + pa_arr = pa.array(series) + if isinstance(pa_arr, pa.ChunkedArray): + return _adapt_chunked_array(pa_arr) + return _adapt_arrow_array(pa_arr) except pa.ArrowInvalid as e: if series.dtype == np.dtype("O"): try: diff --git a/tests/system/small/test_dataframe.py b/tests/system/small/test_dataframe.py index dce0a649f6..58bfc615ef 100644 --- a/tests/system/small/test_dataframe.py +++ b/tests/system/small/test_dataframe.py @@ -138,6 +138,16 @@ def test_df_construct_structs(session): ) +def test_df_construct_local_concat_pd(scalars_pandas_df_index, session): + pd_df = pd.concat([scalars_pandas_df_index, scalars_pandas_df_index]) + + bf_df = session.read_pandas(pd_df) + + pd.testing.assert_frame_equal( + bf_df.to_pandas(), pd_df, check_index_type=False, check_dtype=False + ) + + def test_df_construct_pandas_set_dtype(scalars_dfs): columns = [ "int64_too",