Skip to content

feat: add head, tail methods#915

Merged
timsaucer merged 2 commits into
apache:mainfrom
ion-elgreco:feat--head,-tail
Oct 21, 2024
Merged

feat: add head, tail methods#915
timsaucer merged 2 commits into
apache:mainfrom
ion-elgreco:feat--head,-tail

Conversation

@ion-elgreco
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

Common methods similar to pyspark/polars/pandas api

What changes are included in this PR?

  • Adds a head method, which uses limit underneath. Same as tail but calls the count of the dataframe to know where to start returning it from

@ion-elgreco ion-elgreco changed the title feat: add head, tail methods feat: add head, tail methods Oct 13, 2024
Copy link
Copy Markdown
Member

@timsaucer timsaucer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do have concerns about tail but head is great.

Comment thread python/datafusion/dataframe.py Outdated
Comment thread python/datafusion/dataframe.py Outdated
@timsaucer timsaucer merged commit f59dd08 into apache:main Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants