Pandas Read Csv Drop Last Column

[Solved] Pandas Read Csv Drop Last Column | Python - Code Explorer | yomemimo.com
Question : pandas read_csv drop last column

Answered by : wideeyed-wombat-j8eoy9er89v7

# Drop last column of a dataframe
df = df.iloc[: , :-1]
# Drop last 2 column of a dataframe
df = df.iloc[: , :-2]

Source : | Last Update : Sat, 21 Aug 21

Answers related to pandas read csv drop last column

Code Explorer Popular Question For Python