Skip to content

CLN: Remove unused variables #21986

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

Merged
merged 10 commits into from
Jul 29, 2018
3 changes: 3 additions & 0 deletions pandas/core/nanops.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,9 @@ def nanvar(values, axis=None, skipna=True, ddof=1):

@disallow('M8', 'm8')
def nansem(values, axis=None, skipna=True, ddof=1):
# This checks if non-numeric-like data is passed with numeric_only=False
# and raises a TypeError otherwise
var = nanvar(values, axis, skipna, ddof=ddof)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If var isn't used, don't assign the result of nanvar to a variable. Just call it without.


mask = isna(values)
if not is_float_dtype(values.dtype):
Expand Down