Q:

how to delete a column from a csv?

I have a csv file that, in a normal world, I would just open using
pd.read_csv('path_to_my_csv.csv')
Unfortunately, the csv is messed-up and I need to delete its second column before feeding it to Pandas.
How can I do that? This is not a duplicate of the other similar question because

I do not know how many columns I have in total
my column do not have names

Thanks!

A:

read_csv usecols
usecols can take a callable
pd.read_csv('file.csv', header=None, usecols=lambda c: c != 1)

