Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

transpose array python

import numpy as np

x = np.arange(4).reshape((2,2))
x
array([[0, 1],
       [2, 3]])

np.transpose(x)
array([[0, 2],
       [1, 3]])
Comment

PREVIOUS NEXT
Code Example
Python :: replace all nan values in dataframe 
Python :: python requests post 
Python :: construct contingency table from pandas 
Python :: write data to using pickle 
Python :: python reverse a string 
Python :: drop a row with a specific value of a column 
Python :: two sum python 
Python :: python exceptions 
Python :: numpy initialize 2d array 
Python :: fastapi json request 
Python :: get a slice of string in python 
Python :: python binary tree 
Python :: npr python 
Python :: increase a date in python 
Python :: pd df drop columns 
Python :: check tensor type tensorflow 
Python :: how to get input python 
Python :: python loop list from last to first 
Python :: python file parent 
Python :: python count multiple characters in string 
Python :: pandas front fill 
Python :: sort dict by values 
Python :: short form of if statement in python 
Python :: numpy round to int 
Python :: python pyqt5 sleep 
Python :: how to make a venv python 
Python :: import os 
Python :: find all files containing a string in python with glob module 
Python :: how to calculate the sum of a list in python 
Python :: make tkinter label and input 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =