-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Add asv benchmarks for Block.setitem() #53177
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
Conversation
asv_bench/benchmarks/block.py
Outdated
(np.array(True), "np.array(True)"), | ||
] | ||
|
||
def setup(self, true_value): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this to indexing.py
?
asv_bench/benchmarks/block.py
Outdated
|
||
def time_test(self, true_value): | ||
"""Test time for assigning a slice `True` and `np.array(True)`""" | ||
tmp_df = self.df.copy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't need this copy
and delete df.copy
Thank you for your response @mroeschke . I solved the issues as you told me , if there is anything else i can do let me know. |
Looks like the new benchmark is failing, please run it locally to see if it's working correctly https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#running-the-performance-test-suite |
I was able to resolve the issue on my local system. Thank you for your feedback @mroeschke |
@mroeschke moved the import at the start of the file as you told me |
@mroeschke Looks like that the tests have passed now and i also moved the imports as you told me. If there is anything else i can do, please let me know. |
Thanks @steliospetrakis02 |
* Add test for groupby with TimeGrouper * add asv_bench for block * add asv_bench for block * Delete block.py , move class Block to indexing.py , as requested and delete df.copy * Add one more parameter to signarures seems to solve the issue * change name to mode * Move import to the start of the file
* Add test for groupby with TimeGrouper * add asv_bench for block * add asv_bench for block * Delete block.py , move class Block to indexing.py , as requested and delete df.copy * Add one more parameter to signarures seems to solve the issue * change name to mode * Move import to the start of the file
* Add test for groupby with TimeGrouper * add asv_bench for block * add asv_bench for block * Delete block.py , move class Block to indexing.py , as requested and delete df.copy * Add one more parameter to signarures seems to solve the issue * change name to mode * Move import to the start of the file
Block.setitem()
whenvalue
is a builtin python type. #25756 (Replace xxxx with the GitHub issue number)doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.I believe that this solves the issue , however let me know if i need to change anything as i am not familliar with asv benchmarks