Skip to content
Draft
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
2 changes: 1 addition & 1 deletion packages/bigframes/bigframes/core/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ def _materialize_local(
else:
raw_df = result_batches.to_pandas()
df = self._copy_index_to_pandas(raw_df)
df.set_axis(self.column_labels, axis=1, copy=False)
df.columns = self.column_labels
return df, execute_result.query_job

def split(
Expand Down
6 changes: 4 additions & 2 deletions packages/bigframes/bigframes/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1743,7 +1743,8 @@ def to_pandas(
)
if query_job:
self._set_internal_query_job(query_job)
return df.set_axis(self._block.column_labels, axis=1, copy=False)
df.columns = self._block.column_labels
return df

def to_pandas_batches(
self,
Expand Down Expand Up @@ -1869,7 +1870,8 @@ def peek(
raise ValueError(
"Cannot peek efficiently when data has aggregates, joins or window functions applied. Use force=True to fully compute dataframe."
)
return maybe_result.set_axis(self._block.column_labels, axis=1, copy=False)
maybe_result.columns = self._block.column_labels
return maybe_result

def nlargest(
self,
Expand Down
Loading