-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Frame ops prelims - de-duplicate, remove unused kwargs #19522
Changes from all commits
a8cc5c0
ce3e616
cffcf31
6c0811a
2de0268
92749dc
98fdcef
85d501c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -451,6 +451,19 @@ def test_arith_flex_frame(self): | |
with tm.assert_raises_regex(NotImplementedError, 'fill_value'): | ||
self.frame.add(self.frame.iloc[0], axis='index', fill_value=3) | ||
|
||
def test_arith_flex_zero_len_raises(self): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't these be in test_arithmetic? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eventually yes. The more important grouping for now is that this belongs with the test above it, which I plan to split/parametrize before moving to test_arithmetic |
||
# GH#19522 passing fill_value to frame flex arith methods should | ||
# raise even in the zero-length special cases | ||
ser_len0 = pd.Series([]) | ||
df_len0 = pd.DataFrame([], columns=['A', 'B']) | ||
df = pd.DataFrame([[1, 2], [3, 4]], columns=['A', 'B']) | ||
|
||
with tm.assert_raises_regex(NotImplementedError, 'fill_value'): | ||
df.add(ser_len0, fill_value='E') | ||
|
||
with tm.assert_raises_regex(NotImplementedError, 'fill_value'): | ||
df_len0.sub(df['A'], axis=None, fill_value=3) | ||
|
||
def test_binary_ops_align(self): | ||
|
||
# test aligning binary ops | ||
|
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.
consider moving this function to core/ops (and parameterizing so you can use it for index/series)