Skip to content

Fix some lgtm alerts #16613

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 8 commits into from
Jun 7, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix argument name in formatting call, useless assignment and wrong ex…
…ception raised
  • Loading branch information
jhelie committed Jun 6, 2017
commit 8fce8d36726b6a755fbcf82deb37df7c6b990c34
6 changes: 3 additions & 3 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4285,7 +4285,7 @@ def asof(self, where, subset=None):
raise ValueError("subset is not valid for Series")
elif self.ndim > 2:
raise NotImplementedError("asof is not implemented "
"for {type}".format(type(self)))
"for {type}".format(type=type(self)))
else:
if subset is None:
subset = self.columns
Expand Down Expand Up @@ -4980,7 +4980,7 @@ def last(self, offset):

offset = to_offset(offset)

start_date = start = self.index[-1] - offset
start_date = self.index[-1] - offset
start = self.index.searchsorted(start_date, side='right')
return self.iloc[start:]

Expand Down Expand Up @@ -5303,7 +5303,7 @@ def _where(self, cond, other=np.nan, inplace=False, axis=None, level=None,

# slice me out of the other
else:
raise NotImplemented("cannot align with a higher dimensional "
raise NotImplementedError("cannot align with a higher dimensional "
"NDFrame")

elif is_list_like(other):
Expand Down