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

[Python] Conversion from custom types (eg decimal) to int dtype raises warning

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Python
    • None

    Description

      In [2]: import decimal
      
      In [3]: pa.array([decimal.Decimal("123456")], pa.int32())
      DeprecationWarning: an integer is required (got type decimal.Decimal).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
      
      Out[3]: 
      <pyarrow.lib.Int32Array object at 0x7f4432032b80>
      [
        123456,
      ]
      

      cc kszucs

      Attachments

        Activity

          People

            Unassigned Unassigned
            jorisvandenbossche Joris Van den Bossche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: