def test_index_tab_completion(self, index): # dir contains string-like values of the Index. s = pd.Series(index=index) dir_s = dir(s) for i, x in enumerate(s.index.unique(level=0)): if i < 100: assert (not isinstance(x, string_types) or not isidentifier(x) or x in dir_s) else: assert x not in dir_s
def complete_dataframe(obj, prev_completions): return prev_completions + [c for c in obj.keys() if isinstance(c, compat.string_types) and compat.isidentifier(c)]
def complete_column_panel_items(obj, prev_completions): return prev_completions + [c for c in list(obj.obj.frames.keys()) \ if isinstance(c, str) and compat.isidentifier(c)]
def complete_column_panel(obj, prev_completions): return prev_completions + [c for c in obj.columns \ if isinstance(c, str) and compat.isidentifier(c)]
def complete_column_panel(self, prev_completions): return [c for c in self.attrs() \ if isinstance(c, str) and compat.isidentifier(c)]
def _local_dir(self): """ add the string-like attributes from the info_axis """ return [ c for c in self.dframes.keys() if isinstance(c, string_types) and isidentifier(c) ]
def complete_dot_wrapper(obj, prev_completions): return prev_completions + [c for c in obj._funcs \ if isinstance(c, str) and compat.isidentifier(c)]
def _local_dir(self): """ add the string-like attributes from the info_axis """ return [c for c in self.dframes.keys() if isinstance(c, string_types) and isidentifier(c)]
def complete_dataframe(obj, prev_completions): return prev_completions + [ c for c in obj.keys() if isinstance(c, compat.string_types) and compat.isidentifier(c) ]
def complete_column_panel_items(obj, prev_completions): return prev_completions + [c for c in obj.names \ if isinstance(c, basestring) and compat.isidentifier(c)]
def complete_index(obj, prev_completions): return prev_completions + [c for c in dir(obj._index) \ if isinstance(c, basestring) and compat.isidentifier(c)]
def complete_attrdict(obj, prev_completions): return prev_completions + [c for c in obj.keys() \ if isinstance(c, basestring) and compat.isidentifier(c)]
def complete_attrdict(obj, prev_completions): return prev_completions + [c for c in list(obj.keys()) \ if isinstance(c, str) and compat.isidentifier(c)]
def complete_rpackage(obj, prev_completions): return prev_completions + [c for c in obj._subgroups \ if isinstance(c, str) and compat.isidentifier(c)]