Hi, I am defining a method where i want to do some changes in the dataframe and want that change to reflect in the caller mehod. But the changes are not shown.
Below is the code. i have two options, feature extraction andbuild models which call two different methods. If user chooses feature extraction i will call feature_engineering(df) and do some changes and then when user chooses build model , i want to call build_model(df) with the new dataframe that i get from feature_engineering(df). But not i am not able to get it.
if menu == "Feature Extraction":
st.title("Feature Engineering")
df = feature_engineering(df)
if menu == "Build Models On Your Data":
build_models(df)
def feature_engineering(df):
if 'Exited' in list(df.columns.values):
df.drop('Exited', axis=1, inplace=True)
if 'Surname' in list(df.columns.values):
df.drop('Surname', axis=1,inplace=True)