Python Function Modify Dataframe In Place