Skip to content

Unable to read first n rows from parquet file. #24511

Closed
@san089

Description

@san089
df = pd.read_parquet(path= 'filepath', nrows = 10)

Problem description

I have a parquet file and I want to read first n rows from the file into a pandas data frame. I did not find any way to do this in the documentation. I tried the 'nrows' and 'skiprows' parameter, but it did not work with the read_parquet() method. Do let me know if there is any way to achieve it that is not mentioned in the documentation.

Alternatively, I can read the complete parquet file and filter the first n rows, but that will require more computations which I want to avoid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions