Last active
July 5, 2016 05:44
-
-
Save kennir/35795c4a3de82f3fe0065d94f1092efc to your computer and use it in GitHub Desktop.
Adds a new column where each entry is the list of two other columns
This file contains 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
df= pd.DataFrame(np.random.randn(10,4)) | |
df[4]= [[df[2][x],df[3][x]] for x in range(df.shape[0])] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment