示例#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