Skip to content

Conversation

@mahmood-iitk
Copy link

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.
  • If I used AI to develop this pull request, I prompted it to follow AGENTS.md.

What

Adds a test ensuring that DataFrame.tail(0) preserves column dtypes.

Why

Empty DataFrames returned by slicing methods should retain dtype
information. This test guards against regressions in tail(0) behavior.

How

Adds a focused test in pandas/tests/frame/methods/test_head_tail.py.

@mroeschke
Copy link
Member

Is this related to an open issue?

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