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

[Python] Pandas roundtrip with object-dtype column labels with integer values: data type "integer" not understood

    XMLWordPrintableJSON

Details

    Description

      The following will fail the roundtrip since the column indexes' pandas_type is converted from int64 to integer when an additional column is introduced and subsequently moved to the index:

       

      df = pd.DataFrame(np.ones((3,1), index=[[1,2,3]])
      df['foo'] = np.arange(3)
      df = df.set_index('foo', append=True)
      table = pyarrow.Table.from_pandas(df)
      table.to_pandas()  # Errors

      Attachments

        Issue Links

          Activity

            People

              arw2019 Andrew Wieteska
              richardw Richard Wu
              Votes:
              0 Vote for this issue
              Watchers:
              5 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 - 1h 20m
                  1h 20m