I read my data
import pandas as pd
df = pd.read_csv('/path/file.tsv', header=0, delimiter='\t')
print df
and get:
id text
0 361.273 text1...
1 374.350 text2...
2 374.350 text3...
How can I delete the id
column from the above data frame?. I tried the following:
import pandas as pd
df = pd.read_csv('/path/file.tsv', header=0, delimiter='\t')
print df.drop('id', 1)
But it raises this exception:
ValueError: labels ['id'] not contained in axis