I have below custom function
import pandas as pd
def MyFn(DF : pd.DataFrame) -> float :
return DF['Col_A'].values[1] - DF['Col_B'].values[1]
However I want to force user to supply a dataframe with 2 columns and having column names as 'Col_A' and 'Col_B'
Any insight how can I do it would be very appreciated.
2