Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-1981

UnicodeEncodeError for column name in pandas_compat.py

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 0.8.0
    • Fix Version/s: None
    • Component/s: Python
    • Labels:

      Description

      Related code

      {{
      Traceback (most recent call last):
      File "project/folder/file.py", line 34, in <module>
      main()
      File "/opt/conda/lib/python2.7/site-packages/click/core.py", line 722, in _call_
      return self.main(*args, **kwargs)
      File "/opt/conda/lib/python2.7/site-packages/click/core.py", line 697, in main
      rv = self.invoke(ctx)
      File "/opt/conda/lib/python2.7/site-packages/click/core.py", line 895, in invoke
      return ctx.invoke(self.callback, **ctx.params)
      File "/opt/conda/lib/python2.7/site-packages/click/core.py", line 535, in invoke
      return callback(*args, **kwargs)
      File "project/folder/file.py", line 29, in main
      df.to_parquet(pq_filename)
      File "/opt/conda/lib/python2.7/site-packages/pandas/core/frame.py", line 1649, in to_parquet
      compression=compression, **kwargs)
      File "/opt/conda/lib/python2.7/site-packages/pandas/io/parquet.py", line 178, in to_parquet
      return impl.write(df, path, compression=compression)
      File "/opt/conda/lib/python2.7/site-packages/pandas/io/parquet.py", line 74, in write
      table = self.api.Table.from_pandas(df)
      File "pyarrow/table.pxi", line 875, in pyarrow.lib.Table.from_pandas (/arrow/python/build/temp.linux-x86_64-2.7/lib.cxx:44927)
      File "/opt/conda/lib/python2.7/site-packages/pyarrow/pandas_compat.py", line 361, in dataframe_to_arrays
      df, names, index_columns, preserve_index, types
      File "/opt/conda/lib/python2.7/site-packages/pyarrow/pandas_compat.py", line 211, in construct_metadata
      df.columns, column_names, df_types
      File "/opt/conda/lib/python2.7/site-packages/pyarrow/pandas_compat.py", line 175, in get_column_metadata
      'field_name': str(field_name),
      UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 31: ordinal not in range(128)
      }}

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ylogx Shubham Chaudhary
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0.5h
                  0.5h
                  Remaining:
                  Remaining Estimate - 0.5h
                  0.5h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified