how to drop hidden column

Viewed 21

I have a csv with three columns, one with city name and one (number of accidents) that was split into two with no column labels.

CHARLOTTE   30  771
RALEIGH     17  872
GREENSBORO  11  506
DURHAM      11  246

After cleaning I have just the two columns and a new column:

    city        num_crashes
147 ABERDEEN    270
107 AHOSKIE     401
406 ALAMANCE    46

When I upload the cleaned csv to BigQuery as a table I get an error:

Failed to create table: Error while reading data, error message: Error detected while parsing row starting at position: 0. Error: Bad character (ASCII 0) encountered.

According to df.info() the new column doesn't exist:

 0   city         805 non-null    object
 1   num_crashes  806 non-null    object
dtypes: object(2)

How do I drop this new column when I don't have a label or index number to use?

Thanks for any help!

0 Answers
Related