Answers for "drop every other column pandas"

1

drop every other column pandas

#We would like to drop every other column
data = data.loc[:, np.arange(len(data.columns)) %2 == 0]
Posted by: Guest on September-05-2021

Python Answers by Framework

Browse Popular Code Answers by Language