Last active
September 16, 2020 01:14
-
-
Save UkiDLucas/25c1dc3e530d3ccb1f48494761d2b88c to your computer and use it in GitHub Desktop.
Julia: DataFrames Insert Column
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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