Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

numpy delete column

import numpy as np

A = np.delete(A, 1, 0)  # delete second row of A
B = np.delete(B, 2, 0)  # delete third row of B
C = np.delete(C, 1, 1)  # delete second column of C
Comment

python numpy delete column

print(np.delete(a, 0, 0))
# [[ 4  5  6  7]
#  [ 8  9 10 11]]

print(np.delete(a, 2, 0))
# [[0 1 2 3]
#  [4 5 6 7]]

# print(np.delete(a, 3, 0))
# IndexError: index 3 is out of bounds for axis 0 with size 3
Comment

PREVIOUS NEXT
Code Example
Python :: bayesian model probability 
Python :: tuplein python 
Python :: Python String count() example 
Python :: python programming language 
Python :: split dataframe row on delimiter python 
Python :: Requested runtime (Python-3.7.6) is not available for this stack (heroku-20). 
Python :: circular queue python 
Python :: k-means clustering 
Python :: python def example 
Python :: python return multiple value from a function 
Python :: tuple python 
Python :: ImportError: No module named pandas 
Python :: Tree recursive function 
Python :: get number of row dataframe pandas 
Python :: Facet Grid for Bar Plot with non-shared y axes (CatPlot) 
Python :: telegram bot carousel 
Python :: python all available paths 
Python :: dataframe python diplay 2 tables on same line 
Python :: how to set default value in many2one 
Python :: python - dashboard 
Python :: python sort list by length of sublist 
Python :: summation 
Python :: ublox kismet 
Python :: list devices python 3 
Python :: xmgrace conditions 
Python :: concatenating ols model results 
Python :: python how to be able to use any python file you made on all projects 
Python :: horney 
Python :: dictionary in python commands 
Python :: skit learn decision 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =