I have the following data frame
import pandas as pd
d = [['a','1'],['b','2']]
d = pd.DataFrame(d,columns=['col1','col2'])
I want to create new functions with names from column 'col1' and copy the body from below into the new created function.
def func1():
print('Hi') ...... more lines of code
The end functions should be like this
def a():
print('Hi') ...... more lines of code
def b():
print('Hi') ...... more lines of code