human
Normalizing a pandas DataFrame by row
assistant
Here is some code to normalize a pandas dataframe `df` by row

df.div(df.sum(axis=1), axis=0)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.