Created
September 29, 2018 14:37
pandas_operation_stack
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
#配列の連結 | |
a=np.array([0,1,2,3,4,5]) | |
a=a.reshape(2,3) | |
b=np.array([6,7,8,9,10,11]) | |
b=b.reshape(2,3) | |
print("a=",a) | |
print("b=",b) | |
#配列を右(水平)に連結 hstack([ , ]) | |
#配列を下(垂直)に連結 vstack([ , ]) | |
c=np.hstack([a,b]) | |
d=np.vstack([a,b]) | |
print("hstack:",c) | |
print("vstack:",d) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment