I want to replace the values in a pandas dataframe column with new values. I know I can assign the array to a new column, drop the original column and then rename the new column as the old column, but that seems like a roundabout way to accomplish such a basic task.
df = pd.DataFrame(np.random.random(10), columns=['Values'])
df['new'] = np.random.random(10)
df.drop(columns = 'Values', inplace = True)
df.rename(columns={"new": "Values"}, inplace=True)
Is there not a better way of accomplishing this?