How to read parquet file with a condition using pyarrow in Python

前端 未结 2 1433
青春惊慌失措
青春惊慌失措 2021-02-09 03:48

I have created a parquet file with three columns (id, author, title) from database and want to read the parquet file with a condition (title=\'Learn Python\'). Below mentioned i

相关标签:
2条回答
  • 2021-02-09 04:50

    This is not yet supported. We intend to develop this functionality in the future. I recommend doing the filtering with pandas after the conversion from Arrow table.

    0 讨论(0)
  • 2021-02-09 04:53

    Filters are now available read_table

    table = pq.read_table(
            df, filters=[("title", "in", {'Learn Python'}), 
                         ("year", ">=", 1950)]
        )
     
    
    0 讨论(0)
提交回复
热议问题