|
76 | 76 | create_block_manager_from_blocks)
|
77 | 77 | from pandas.core.series import Series
|
78 | 78 | from pandas.core.categorical import Categorical
|
79 |
| -import pandas.core.computation.expressions as expressions |
80 | 79 | import pandas.core.algorithms as algorithms
|
81 |
| -from pandas.core.computation.eval import eval as _eval |
82 | 80 | from pandas.compat import (range, map, zip, lrange, lmap, lzip, StringIO, u,
|
83 | 81 | OrderedDict, raise_with_traceback)
|
84 | 82 | from pandas import compat
|
@@ -2296,6 +2294,8 @@ def eval(self, expr, inplace=False, **kwargs):
|
2296 | 2294 | >>> df.eval('a + b')
|
2297 | 2295 | >>> df.eval('c = a + b')
|
2298 | 2296 | """
|
| 2297 | + from pandas.core.computation.eval import eval as _eval |
| 2298 | + |
2299 | 2299 | inplace = validate_bool_kwarg(inplace, 'inplace')
|
2300 | 2300 | resolvers = kwargs.pop('resolvers', None)
|
2301 | 2301 | kwargs['level'] = kwargs.pop('level', 0) + 1
|
@@ -3845,6 +3845,7 @@ def _combine_const(self, other, func, raise_on_error=True, try_cast=True):
|
3845 | 3845 |
|
3846 | 3846 | def _compare_frame_evaluate(self, other, func, str_rep, try_cast=True):
|
3847 | 3847 |
|
| 3848 | + import pandas.core.computation.expressions as expressions |
3848 | 3849 | # unique
|
3849 | 3850 | if self.columns.is_unique:
|
3850 | 3851 |
|
@@ -3997,6 +3998,7 @@ def combine_first(self, other):
|
3997 | 3998 | -------
|
3998 | 3999 | combined : DataFrame
|
3999 | 4000 | """
|
| 4001 | + import pandas.core.computation.expressions as expressions |
4000 | 4002 |
|
4001 | 4003 | def combiner(x, y, needs_i8_conversion=False):
|
4002 | 4004 | x_values = x.values if hasattr(x, 'values') else x
|
@@ -4032,6 +4034,7 @@ def update(self, other, join='left', overwrite=True, filter_func=None,
|
4032 | 4034 | If True, will raise an error if the DataFrame and other both
|
4033 | 4035 | contain data in the same place.
|
4034 | 4036 | """
|
| 4037 | + import pandas.core.computation.expressions as expressions |
4035 | 4038 | # TODO: Support other joins
|
4036 | 4039 | if join != 'left': # pragma: no cover
|
4037 | 4040 | raise NotImplementedError("Only left join is supported")
|
|
0 commit comments