mirror of
https://github.com/elastic/eland.git
synced 2025-07-11 00:02:14 +08:00
Resolved minor PyCharm issues
This commit is contained in:
parent
5ee6228a95
commit
8de7a1db7d
@ -1,14 +1,14 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from eland.client import *
|
||||
from eland.dataframe import *
|
||||
from eland.filter import *
|
||||
from eland.index import *
|
||||
from eland.mappings import *
|
||||
from eland.ndframe import *
|
||||
from eland.operations import *
|
||||
from eland.plotting import *
|
||||
from eland.query import *
|
||||
from eland.operations import *
|
||||
from eland.query_compiler import *
|
||||
from eland.plotting import *
|
||||
from eland.ndframe import *
|
||||
from eland.series import *
|
||||
from eland.dataframe import *
|
||||
from eland.utils import *
|
||||
|
@ -1,6 +1,5 @@
|
||||
import sys
|
||||
import warnings
|
||||
from distutils.version import LooseVersion
|
||||
from io import StringIO
|
||||
|
||||
import numpy as np
|
||||
@ -92,18 +91,8 @@ class DataFrame(NDFrame):
|
||||
"""
|
||||
From pandas
|
||||
"""
|
||||
try:
|
||||
import IPython
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
if LooseVersion(IPython.__version__) < LooseVersion('3.0'):
|
||||
if console.in_qtconsole():
|
||||
# 'HTML output is disabled in QtConsole'
|
||||
return None
|
||||
|
||||
if self._info_repr():
|
||||
buf = StringIO()
|
||||
buf = StringIO("")
|
||||
self.info(buf=buf)
|
||||
# need to escape the <class>, should be the first line.
|
||||
val = buf.getvalue().replace('<', r'<', 1)
|
||||
@ -138,7 +127,7 @@ class DataFrame(NDFrame):
|
||||
def info_es(self):
|
||||
buf = StringIO()
|
||||
|
||||
super().info_es(buf)
|
||||
super()._info_es(buf)
|
||||
|
||||
return buf.getvalue()
|
||||
|
||||
@ -529,7 +518,7 @@ class DataFrame(NDFrame):
|
||||
- string function name
|
||||
- list of functions and/or function names, e.g. ``[np.sum, 'mean']``
|
||||
- dict of axis labels -> functions, function names or list of such.
|
||||
%(axis)s
|
||||
axis
|
||||
*args
|
||||
Positional arguments to pass to `func`.
|
||||
**kwargs
|
||||
@ -570,7 +559,7 @@ class DataFrame(NDFrame):
|
||||
"""
|
||||
if isinstance(expr, BooleanFilter):
|
||||
return DataFrame(
|
||||
query_compiler=self._query_compiler._update_query(key)
|
||||
query_compiler=self._query_compiler._update_query(BooleanFilter(expr))
|
||||
)
|
||||
elif isinstance(expr, six.string_types):
|
||||
return DataFrame(
|
||||
|
@ -114,14 +114,7 @@ class NDFrame:
|
||||
"""
|
||||
return len(self.index)
|
||||
|
||||
@property
|
||||
def iloc(self):
|
||||
"""Purely integer-location based indexing for selection by position.
|
||||
|
||||
"""
|
||||
return _iLocIndexer(self)
|
||||
|
||||
def info_es(self, buf):
|
||||
def _info_es(self, buf):
|
||||
self._query_compiler.info_es(buf)
|
||||
|
||||
def drop(
|
||||
|
@ -436,34 +436,6 @@ class ElandQueryCompiler:
|
||||
def _hist(self, num_bins):
|
||||
return self._operations.hist(self, num_bins)
|
||||
|
||||
def apply(self, func, axis, *args, **kwargs):
|
||||
"""Apply func across given axis.
|
||||
|
||||
Args:
|
||||
func: The function to apply.
|
||||
axis: Target axis to apply the function along.
|
||||
|
||||
Returns:
|
||||
A new QueryCompiler.
|
||||
"""
|
||||
"""Apply func across given axis.
|
||||
|
||||
Args:
|
||||
func: The function to apply.
|
||||
axis: Target axis to apply the function along.
|
||||
|
||||
Returns:
|
||||
A new PandasQueryCompiler.
|
||||
"""
|
||||
if callable(func):
|
||||
return self._callable_func(func, axis, *args, **kwargs)
|
||||
elif isinstance(func, dict):
|
||||
return self._dict_func(func, axis, *args, **kwargs)
|
||||
elif is_list_like(func):
|
||||
return self._list_like_func(func, axis, *args, **kwargs)
|
||||
else:
|
||||
pass
|
||||
|
||||
def _update_query(self, boolean_filter):
|
||||
result = self.copy()
|
||||
|
||||
|
@ -35,7 +35,7 @@ class Series(NDFrame):
|
||||
index_pattern : str
|
||||
An Elasticsearch index pattern. This can contain wildcards (e.g. filebeat-*).
|
||||
|
||||
field_name : str
|
||||
index_field : str
|
||||
The field to base the series on
|
||||
|
||||
See Also
|
||||
|
File diff suppressed because one or more lines are too long
@ -7144,7 +7144,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.6.8"
|
||||
"version": "3.7.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
Loading…
x
Reference in New Issue
Block a user