예제 #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
파일: models.py 프로젝트: zhiqiangyan/cili
 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)]