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

[Python] from pandas raises ArrowInvalid for date(time) subclasses

    XMLWordPrintableJSON

    Details

      Description

      When converting a pandas dataframe holding subclasses of date/datetime objects, arrow raises an ArrowInvalid exception

      import pandas as pd
      import pyarrow as pa
      import datetime
      
      classMyDate(datetime.date):
          pass
      
      date_array = [MyDate(2000, 1, 1)]
      df = pd.DataFrame({"date": pd.Series(date_array, dtype=object)})
      
      table = pa.Table.from_pandas(df)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                fjetter Florian Jetter
                Reporter:
                fjetter Florian Jetter
              • Votes:
                0 Vote for this issue
                Watchers:
                2 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 - 50m
                  50m