示例#1
0
 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
示例#2
0
文件: test_api.py 项目: scari/pandas
 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
示例#3
0
文件: panel.py 项目: APWaldo/pandas
 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)]
示例#4
0
 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)]                                          
示例#5
0
 def complete_column_panel(obj, prev_completions):
     return prev_completions + [c for c in obj.columns \
                 if isinstance(c, str) and compat.isidentifier(c)]                                          
示例#6
0
 def complete_column_panel(self, prev_completions):
     return [c for c in self.attrs() \
                 if isinstance(c, str) and compat.isidentifier(c)]                                          
示例#7
0
 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)
     ]
示例#8
0
 def complete_dot_wrapper(obj, prev_completions):
     return prev_completions + [c for c in obj._funcs \
                 if isinstance(c, str) and compat.isidentifier(c)]                                          
示例#9
0
 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)]
示例#10
0
 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)]
示例#11
0
 def complete_column_panel(obj, prev_completions):
     return prev_completions + [c for c in obj.columns \
                 if isinstance(c, str) and compat.isidentifier(c)]
示例#12
0
 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)
     ]
示例#13
0
 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)]                                          
示例#14
0
 def complete_index(obj, prev_completions):
     return prev_completions + [c for c in dir(obj._index) \
                 if isinstance(c, basestring) and compat.isidentifier(c)]                                          
示例#15
0
 def complete_attrdict(obj, prev_completions):
     return prev_completions + [c for c in obj.keys() \
                 if isinstance(c, basestring) and compat.isidentifier(c)]                                          
示例#16
0
 def complete_attrdict(obj, prev_completions):
     return prev_completions + [c for c in list(obj.keys()) \
                 if isinstance(c, str) and compat.isidentifier(c)]                                          
示例#17
0
 def complete_rpackage(obj, prev_completions):
     return prev_completions + [c for c in obj._subgroups \
                 if isinstance(c, str) and compat.isidentifier(c)]