Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit d956453

Browse files
committed
chore: address PR review comments
1 parent f8241d7 commit d956453

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

bigframes/core/blocks.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3477,11 +3477,7 @@ def _pd_index_to_array_value(
34773477
row[offset_id] = row_offset
34783478
rows.append(row)
34793479

3480-
import pyarrow as pa
3481-
34823480
if not rows:
3483-
from bigframes.dtypes import bigframes_dtype_to_arrow_dtype
3484-
34853481
dtypes_list = getattr(index, "dtypes", None)
34863482
if dtypes_list is None:
34873483
dtypes_list = (
@@ -3491,7 +3487,7 @@ def _pd_index_to_array_value(
34913487
fields = []
34923488
for col_id, dtype in zip(col_ids, dtypes_list):
34933489
try:
3494-
pa_type = bigframes_dtype_to_arrow_dtype(dtype)
3490+
pa_type = bigframes.dtypes.bigframes_dtype_to_arrow_dtype(dtype)
34953491
except Exception:
34963492
pa_type = pa.string()
34973493
fields.append(pa.field(col_id, pa_type))

tests/system/small/test_dataframe.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5915,18 +5915,6 @@ def test_to_gbq_obj_ref_persists(session):
59155915
assert loaded_df["uris"].dtype == dtypes.OBJ_REF_DTYPE
59165916

59175917

5918-
def test_dataframe_melt_multiindex(session):
5919-
# Tests that `melt` operations via count do not cause MultiIndex drops in Arrow
5920-
df = pd.DataFrame({"A": [1], "B": ["string"], "C": [3]})
5921-
df.columns = pd.MultiIndex.from_tuples(
5922-
[("Group1", "A"), ("Group2", "B"), ("Group1", "C")]
5923-
)
5924-
bdf = session.read_pandas(df)
5925-
5926-
count_df = bdf.count().to_pandas()
5927-
assert count_df.shape[0] == 3
5928-
5929-
59305918
@pytest.mark.parametrize(
59315919
("col_names", "ignore_index"),
59325920
[

0 commit comments

Comments
 (0)