Trying to remove the first row in python fails?

Trying to remove the first row in python fails?

Hi I have some data in csv format, this is what the top of it looks like.

Hi I have some data in csv format, this is what the top of it looks like.

I have some very simple code that is just meant to remove the first row:

import numpy as np
import pandas as pd
data = pd.read_csv("mydata.csv")
data = data.drop(data.columns[[0]],axis=0)
data.to_csv("mydata2.csv")

However when run, I receieve this error:

Warning (from warnings module):
  File "C:/Users/george/Desktop/testing/output/PIVOTING.py", line 1
DtypeWarning: Columns (6) have mixed types. Specify dtype option on import or set low_memory=False.

Traceback (most recent call last): File "C:/Users/george/Desktop/testing/output/PIVOTING.py", line 5, in <module> data = data.drop(data.columns[[0]],axis=0) File "C:\Python27\lib\site-packages\pandas\core\frame.py", line 3697, in drop errors=errors) File "C:\Python27\lib\site-packages\pandas\core\generic.py", line 3111, in drop obj = obj._drop_axis(labels, axis, level=level, errors=errors) File "C:\Python27\lib\site-packages\pandas\core\generic.py", line 3143, in _drop_axis new_axis = axis.drop(labels, errors=errors) File "C:\Python27\lib\site-packages\pandas\core\indexes\base.py", line 4404, in drop '{} not found in axis'.format(labels[mask])) KeyError: "['C'] not found in axis"


Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Python Data Science: Treating Missing Values Using NumPy and Pandas in JupyterLab

Python Data Science: Treating Missing Values Using NumPy and Pandas in JupyterLab. Learn how to Adjust Missing Values and Remove unwanted values in this Data Analytics Tutorial using NumPy and Pandas. This Python For data science Tutorial is for beginners as well as advanced programmers.

Generating Mock Data with Python (NumPy, Pandas, & Datetime Libraries)

In this Generating Mock Data with Python, we write a python script to automatically generate a sales dataset. To do this we use the NumPy, Pandas, Calendar, & Datetime libraries.

Python Pandas Tutorial - Data Analysis with Python Pandas

Python Pandas Tutorial - Data Analysis with Python Pandas will help you get started with Python Pandas Library for various applications including Data analysis. You'll learn: Introduction to Pandas; DataFrames and Series; How To View Data? Selecting Data; Handling Missing Data; Pandas Operations; Merge, Group, Reshape Data; Time Series And Categoricals; Plotting Using Pandas