Skip to content

PERF: use _get_axis_number instead of if axis in [...]: #43048 #43298

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

KiranHipparagi
Copy link

Added _get_axis_number in test_at_time.py as per the standards

 if axis in ["index", 0]:              #<- master
      expected = ts.loc[indices, :]
 elif axis in ["columns", 1]:
      expected = ts.loc[:, indices]

 axis = self.data._get_axis_number(axis)   #<- PR
 expected = ts.loc[indices, :] if axis == 0 else ts.loc[:, indices]

@simonjayhawkins
Copy link
Member

Thanks @KiranHipparagi for the PR. from #43048

...non-test codebase (i.e. don't find code examples in pandas/tests)

so closing this one.

@KiranHipparagi
Copy link
Author

@simonjayhawkins can you please tell me why this PR closed. i'm new to open source contribution.This is my first PR on git.

@simonjayhawkins
Copy link
Member

see #43048 (comment)

Don't try and fix test files in pandas/tests.

@KiranHipparagi
Copy link
Author

@simonjayhawkins Thank you for the clarification.

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