Skip to content

Instantly share code, notes, and snippets.

@viniroger
Created March 21, 2019 09:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viniroger/6b3f7273db52faf83012c8b2c2f819f5 to your computer and use it in GitHub Desktop.
Save viniroger/6b3f7273db52faf83012c8b2c2f819f5 to your computer and use it in GitHub Desktop.
Fill a column from a pandas dataframe with random values
import random
random.seed(42)
df['column_name'] = df['column_name'].apply(lambda v: random.random() * 100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment