예제 #1
0
파일: map.py 프로젝트: hirzel/lale
 def visit_Subscript(self, node: ast.Subscript):
     column_name = _it_column(node)
     if column_name is None or not column_name.strip():
         raise ValueError("Name of the column cannot be None or empty.")
     if column_name not in self.df.columns:
         raise ValueError(
             f"The column {column_name} is not present in the dataframe")
예제 #2
0
파일: map.py 프로젝트: hirzel/lale
 def visit_Attribute(self, node: ast.Attribute):
     column_name = _it_column(node)
     if column_name not in self.df.columns:
         raise ValueError(
             f"The column {column_name} is not present in the dataframe")
예제 #3
0
파일: map.py 프로젝트: hirzel/lale
 def visit_Subscript(self, node: ast.Subscript):
     self.accessed.add(_it_column(node))
예제 #4
0
파일: map.py 프로젝트: hirzel/lale
 def visit_Attribute(self, node: ast.Attribute):
     self.accessed.add(_it_column(node))
예제 #5
0
 def visit_Subscript(self, node: ast.Subscript):
     column_name = _it_column(node)
     self.result = self.df[column_name]
예제 #6
0
 def visit_Attribute(self, node: ast.Attribute):
     column_name = _it_column(node)
     self.result = self.df[column_name]
예제 #7
0
 def visit_Subscript(self, node: ast.Subscript):
     column_name = _it_column(node)
     self.result = col(column_name)  # type: ignore
예제 #8
0
 def visit_Attribute(self, node: ast.Attribute):
     column_name = _it_column(node)
     self.result = col(column_name)  # type: ignore