Skip to content

Instantly share code, notes, and snippets.

@rsalaza4
Created May 28, 2024 19:17
Show Gist options
  • Save rsalaza4/5e77685a63414693e3187de2b0cc7e68 to your computer and use it in GitHub Desktop.
Save rsalaza4/5e77685a63414693e3187de2b0cc7e68 to your computer and use it in GitHub Desktop.
# Add Replicate column
data["Replicate"] = list(np.arange(1, data["Part"].value_counts()[1]+1))*(int(len(data["Part"])/data["Part"].value_counts()[1]))
# Display top rows
data.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment