Skip to content

Instantly share code, notes, and snippets.

@UkiDLucas
Last active September 16, 2020 01:14
Show Gist options
  • Save UkiDLucas/25c1dc3e530d3ccb1f48494761d2b88c to your computer and use it in GitHub Desktop.
Save UkiDLucas/25c1dc3e530d3ccb1f48494761d2b88c to your computer and use it in GitHub Desktop.
Julia: DataFrames Insert Column
rows = size(df)[1] # tuple gives you (rows,columns) of the DataFrame
insertcols!(df, # DataFrame to be changed
2, # insert as column 2
:Day => 1:rows, # populate as "Day" with 1,2,3,.. # or :file_path => "_",
makeunique=true) # if the name of the column exist, make is Day_1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment