Hi I would like to write a function to add two columns to my dataframe below:
ID NUMBER OBJECT
1345471886 SIZE-43 GHJ
1481654311 SIZE-48 IJF
8620787660 SIZE-67 EFH
This is my code:
def add_columns(res):
h = res.assign(Column_1='Value_1', Column_2='Value_2')
return h
print(h)
I get NameError: name 'h' is not defined
My expected output would be:
ID NUMBER OBJECT Column_1 Column_2
1345471886 SIZE-43 GHJ Value_1 Value_2
1481654311 SIZE-48 IJF Value_1 Value_2
8620787660 SIZE-67 EFH Value_1 Value_2
Can you please help? Thanks a lot !!