-
Notifications
You must be signed in to change notification settings - Fork 653
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
REFACTOR-#1941: move index access from DataFrame.insert to backend #1942
REFACTOR-#1941: move index access from DataFrame.insert to backend #1942
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1942 +/- ##
==========================================
+ Coverage 81.68% 81.70% +0.01%
==========================================
Files 79 79
Lines 9283 9282 -1
==========================================
+ Hits 7583 7584 +1
+ Misses 1700 1698 -2
Continue to review full report at Codecov.
|
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.
Something went wrong with tests, but looks like it is known issue. You need a rebase.
@@ -1898,6 +1898,8 @@ def insert(self, loc, column, value): | |||
value = value.reindex(self.index) | |||
else: | |||
value = list(value) | |||
else: | |||
value = [value] * len(self.index) |
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.
I think it's better to leave a value
creation with np.full
.
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.
Currently, np.full
is used in API layer and here all list-like structures (including np.array
) are transformed to list
. So I just keep semantics by building a list here.
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.
Okay, I see. Then you just need to rebase on master in order to rerun tests.
Signed-off-by: ienkovich <ilya.enkovich@intel.com>
@ienkovich , thanks, LGTM! |
…to backend (modin-project#1942) Signed-off-by: ienkovich <ilya.enkovich@intel.com>
What do these changes do?
Avoid index access in API layer when scalar is inserted as a new column.
flake8 modin
black --check modin
git commit -s