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

前端 未结 2 832
长情又很酷
长情又很酷 2021-02-09 04:05

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:40

    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:40

    Filters are now available read_table

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