File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed
Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -3474,27 +3474,7 @@ def _pd_index_to_array_value(
34743474 Create an ArrayValue from a list of label tuples.
34753475 The last column will be row offsets.
34763476 """
3477- if index .empty :
3478- id_gen = bigframes .core .identifiers .standard_id_strings ()
3479- col_ids = [next (id_gen ) for _ in range (index .nlevels + 1 )]
3480-
3481- data_dict = {}
3482- if isinstance (index , pd .MultiIndex ):
3483- dtypes = index .dtypes .values .tolist ()
3484- else :
3485- dtypes = [index .dtype ]
34863477
3487- for col_id , dtype in zip (col_ids [:- 1 ], dtypes ):
3488- try :
3489- bf_dtype = bigframes .dtypes .bigframes_type (dtype )
3490- pa_type = bigframes .dtypes .bigframes_dtype_to_arrow_dtype (bf_dtype )
3491- except TypeError :
3492- pa_type = pa .string ()
3493- data_dict [col_id ] = pa .array ([], type = pa_type )
3494-
3495- data_dict [col_ids [- 1 ]] = pa .array ([], type = pa .int64 ())
3496- table = pa .Table .from_pydict (data_dict )
3497- return core .ArrayValue .from_pyarrow (table , session = session )
34983478 rows = []
34993479 labels_as_tuples = utils .index_as_tuples (index )
35003480 for row_offset in range (len (index )):
You can’t perform that action at this time.
0 commit comments