Skip to content

CLN: assorted (non-pytables) cleanups #29985

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 14 commits into from
Dec 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions pandas/core/computation/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,16 +306,16 @@ def eval(
"multi-line expressions are only valid in the "
"context of data, use DataFrame.eval"
)
engine = _check_engine(engine)
_check_parser(parser)
_check_resolvers(resolvers)

ret = None
first_expr = True
target_modified = False

for expr in exprs:
expr = _convert_expression(expr)
engine = _check_engine(engine)
_check_parser(parser)
_check_resolvers(resolvers)
_check_for_locals(expr, level, parser)

# get our (possibly passed-in) scope
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/arrays/test_datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def datetime_index(request):
"""
freqstr = request.param
# TODO: non-monotone indexes; NaTs, different start dates, timezones
pi = pd.date_range(start=pd.Timestamp("2000-01-01"), periods=100, freq=freqstr)
return pi
dti = pd.date_range(start=pd.Timestamp("2000-01-01"), periods=100, freq=freqstr)
return dti
Copy link
Member

Choose a reason for hiding this comment

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

Why not just return pd.date_range(...)



@pytest.fixture
Expand Down
4 changes: 0 additions & 4 deletions pandas/tests/test_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2974,14 +2974,10 @@ def test_partition_sep_kwarg(self):
# GH 22676; depr kwarg "pat" in favor of "sep"
values = Series(["a_b_c", "c_d_e", np.nan, "f_g_h"])

# str.partition
# using sep -> no warning
expected = values.str.partition(sep="_")
result = values.str.partition("_")
tm.assert_frame_equal(result, expected)

# str.rpartition
# using sep -> no warning
expected = values.str.rpartition(sep="_")
result = values.str.rpartition("_")
tm.assert_frame_equal(result, expected)
Expand Down