@@ -400,11 +400,12 @@ def memory_usage(self, index: bool = True):
400
400
column_sizes = self .dtypes .map (
401
401
lambda dtype : bigframes .dtypes .DTYPE_BYTE_SIZES .get (dtype , 8 ) * n_rows
402
402
)
403
- if index :
403
+ if index and self . _has_index :
404
404
index_size = pandas .Series ([self .index ._memory_usage ()], index = ["Index" ])
405
405
column_sizes = pandas .concat ([index_size , column_sizes ])
406
406
return column_sizes
407
407
408
+ @requires_index
408
409
def info (
409
410
self ,
410
411
verbose : Optional [bool ] = None ,
@@ -768,7 +769,7 @@ def _apply_series_binop_axis_0(
768
769
block = block .drop_columns ([get_column_left [column_id ]])
769
770
770
771
block = block .drop_columns ([series_col ])
771
- block = block .with_index_labels (self .index .names )
772
+ block = block .with_index_labels (self ._block . index .names )
772
773
return DataFrame (block )
773
774
774
775
def _apply_series_binop_axis_1 (
@@ -1611,7 +1612,7 @@ def _assign_series_join_on_index(
1611
1612
# Update case, remove after copying into columns
1612
1613
block = block .drop_columns ([source_column ])
1613
1614
1614
- return DataFrame (block .with_index_labels (self .index .names ))
1615
+ return DataFrame (block .with_index_labels (self ._block . index .names ))
1615
1616
1616
1617
def reset_index (self , * , drop : bool = False ) -> DataFrame :
1617
1618
block = self ._block .reset_index (drop )
@@ -3283,7 +3284,7 @@ def _prepare_export(
3283
3284
array_value = self ._block .expr
3284
3285
3285
3286
new_col_labels , new_idx_labels = utils .get_standardized_ids (
3286
- self ._block .column_labels , self .index .names
3287
+ self ._block .column_labels , self ._block . index .names
3287
3288
)
3288
3289
3289
3290
columns = list (self ._block .value_columns )
@@ -3320,7 +3321,7 @@ def _run_io_query(
3320
3321
session = self ._block .expr .session
3321
3322
self ._optimize_query_complexity ()
3322
3323
export_array , id_overrides = self ._prepare_export (
3323
- index = index , ordering_id = ordering_id
3324
+ index = index and self . _has_index , ordering_id = ordering_id
3324
3325
)
3325
3326
3326
3327
_ , query_job = session ._execute (
0 commit comments