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

[Python] Safe cast fails from numpy float64 array with nans to integer

    XMLWordPrintableJSON

Details

    Description

      ```

      >>> pa.Array.from_pandas(pd.Series([1, None]), type=pa.int32(), safe=True)
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "pyarrow/array.pxi", line 474, in pyarrow.lib.Array.from_pandas
        File "pyarrow/array.pxi", line 169, in pyarrow.lib.array
        File "pyarrow/array.pxi", line 69, in pyarrow.lib._ndarray_to_array
        File "pyarrow/error.pxi", line 81, in pyarrow.lib.check_status
      pyarrow.lib.ArrowInvalid: Floating point value truncated

      ```

      Attachments

        Issue Links

          Activity

            People

              kszucs Krisztian Szucs
              bryanc Bryan Cutler
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 20m
                  2h 20m