Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion bigframes/core/local_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions tests/system/small/test_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down