Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas read_csv drop last column

# Drop last column of a dataframe
df = df.iloc[: , :-1]
# Drop last 2 column of a dataframe
df = df.iloc[: , :-2]
 
PREVIOUS NEXT
Tagged: #pandas #drop #column
ADD COMMENT
Topic
Name
8+4 =