Skip to content

Commit db6176c

Browse files
simnyatsangawesm
authored andcommitted
Not using str with frombytes to ensure Python3 tests pass.
Removing additional instances of using frombytes with str. Removing additional instances of using frombytes with str.
1 parent e9385c7 commit db6176c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/pyarrow/pandas_compat.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def get_column_metadata(column, name, arrow_type, field_name):
171171
)
172172

173173
if not isinstance(field_name, six.string_types):
174-
field_name = frombytes(str(field_name))
174+
field_name = frombytes(field_name)
175175

176176
return {
177177
'name': name,
@@ -333,7 +333,7 @@ def dataframe_to_arrays(df, schema, preserve_index, nthreads=1):
333333
if not isinstance(name, six.string_types):
334334
name = _column_name_to_strings(name)
335335
if name is not None:
336-
name = frombytes(str(name))
336+
name = frombytes(name)
337337

338338
if schema is not None:
339339
field = schema.field_by_name(name)
@@ -567,7 +567,7 @@ def table_to_blockmanager(options, table, memory_pool, nthreads=1,
567567
for c in columns:
568568
column_name = c['name']
569569
if not isinstance(column_name, six.text_type):
570-
column_name = frombytes(str(column_name))
570+
column_name = frombytes(column_name)
571571

572572
columns_name_dict[c.get('field_name', column_name)] = c['name']
573573

0 commit comments

Comments
 (0)