0
class dataM:

   a=[]
   b=[]
   c=[]

   def __init__(self):
       self.data=[]
       self.data = pd.DataFrame(pd.read_csv(file_Name))
       self.a = self.data['a']
       self.b = self.data['b']
    
   def merge(self, col_name1, col_name2):
       concat=[self.col_name1, self.col_name2]

I am trying to reference the value passed in from the function parameter. For example, if the col_name1 equals 'a' in the merge function, merge('a', 'b'), I want the concat list to reference self.a.

khelwood
  • 55,782
  • 14
  • 81
  • 108

0 Answers0