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

[Python] Table.from_pandas() column order not respected

Details

    Description

      Starting with 0.12, the order of the columns in Table.from_pandas is no longer identical to the order of the colums given in the columns argument. This used to be the case in previous versions.

      0.12:

      In [1]: pyarrow.Table.from_pandas(pd.DataFrame(dict(a=[1],b=[2])), columns=['b', 'a'])
      Out[1]:
      pyarrow.Table
      a: int64
      b: int64

      0.11:

      In [1]: pyarrow.Table.from_pandas(pd.DataFrame(dict(a=[1],b=[2])), columns=['b', 'a'])
      Out[1]:
      pyarrow.Table
      b: int64
      a: int64

      Attachments

        Issue Links

          Activity

            People

              wesm Wes McKinney
              amerkel3 Andreas
              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 - 20m
                  20m

                  Slack

                    Issue deployment