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

[Python] wrong conversion of DataFrame with boolean values

    XMLWordPrintableJSON

Details

    Description

      From https://github.com/pandas-dev/pandas/issues/28090

      In [19]: df = pd.DataFrame(np.ones((3, 2), dtype=bool), columns=['a', 'b']) 
      
      In [20]: df  
      Out[20]: 
            a     b
      0  True  True
      1  True  True
      2  True  True
      
      In [21]: table = pa.table(df) 
      
      In [23]: table.column(0)
      Out[23]: 
      <pyarrow.lib.ChunkedArray object at 0x7fd08a96e090>
      [
        [
          true,
          false,
          false,
        ]
      ]
      

      The resulting table has False values while the original DataFrame had only true values.
      It seems this has to do with the fact that it are multiple columns, as with a single column it converts correctly.

      Attachments

        Issue Links

          Activity

            People

              jorisvandenbossche Joris Van den Bossche
              jorisvandenbossche Joris Van den Bossche
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 0.5h
                  0.5h