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

ArrowInvalid: Invalid: Python object of type float is not None and is not a string, bool, or date object

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.4.0
    • Python
    • None

    Description

      in python 3.6, arrow 0.3.0 and pandas 0.20.1 running the following:

      import pyarrow as pa
      import pandas as pd
      
      rec2_df = pd.DataFrame({'0.7': {49283: 0.0}, '@proxy_inject': {49283: '@jst'}}, dtype=object)
      bad_table = pa.Table.from_pandas(rec2_df)
      

      yields this error:

      ---------------------------------------------------------------------------
      ArrowInvalid                              Traceback (most recent call last)
      <ipython-input-1-d84bff18cc35> in <module>()
            3 
            4 rec2_df = pd.DataFrame({'0.7': {49283: 0.0}, '@proxy_inject': {49283: '@jst'}}, dtype=object)
      ----> 5 bad_table = pa.Table.from_pandas(rec2_df)
      
      /Users/william/anaconda/envs/parquet-python/lib/python3.6/site-packages/pyarrow/_table.pyx in pyarrow._table.Table.from_pandas (/Users/travis/miniconda3/conda-bld/pyarrow_1494071287970/work/arrow-d8db8f8a11abbbb6c45645b2d7370610311731bd/python/build/temp.macosx-10.9-x86_64-3.6/_table.cxx:9250)()
      
      /Users/william/anaconda/envs/parquet-python/lib/python3.6/site-packages/pyarrow/_table.pyx in pyarrow._table._dataframe_to_arrays (/Users/travis/miniconda3/conda-bld/pyarrow_1494071287970/work/arrow-d8db8f8a11abbbb6c45645b2d7370610311731bd/python/build/temp.macosx-10.9-x86_64-3.6/_table.cxx:5997)()
      
      /Users/william/anaconda/envs/parquet-python/lib/python3.6/site-packages/pyarrow/_array.pyx in pyarrow._array.Array.from_pandas (/Users/travis/miniconda3/conda-bld/pyarrow_1494071287970/work/arrow-d8db8f8a11abbbb6c45645b2d7370610311731bd/python/build/temp.macosx-10.9-x86_64-3.6/_array.cxx:16456)()
      
      /Users/william/anaconda/envs/parquet-python/lib/python3.6/site-packages/pyarrow/_error.pyx in pyarrow._error.check_status (/Users/travis/miniconda3/conda-bld/pyarrow_1494071287970/work/arrow-d8db8f8a11abbbb6c45645b2d7370610311731bd/python/build/temp.macosx-10.9-x86_64-3.6/_error.cxx:1249)()
      
      ArrowInvalid: Invalid: Python object of type float is not None and is not a string, bool, or date object
      

      Attachments

        Issue Links

          Activity

            People

              wesm Wes McKinney
              gallamine William Cox
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: