1

CSV file as stack.csv

PROBLEM_CODE;OWNER_EMAIL;CALENDAR_YEAR;CALENDAR_QUARTER
CONFIG_ASSISTANCE;[email protected];2014;2014Q3
ERROR_MESSAGES;[email protected];2014;2014Q3
PASSWORD_RECOV;[email protected];2014;2014Q3
ERROR_MESSAGES;[email protected];2014;2014Q3
ERROR_MESSAGES;[email protected];2014;2014Q3
SOFTWARE_FAILURE;[email protected];2014;2014Q3
ERROR_MESSAGES;[email protected];2014;2014Q3
SOFTWARE_FAILURE;[email protected];2014;2014Q3

My Code:

import pandas as pd 
import csv
data = pd.read_csv('stack.csv', sep='delimiter')
min_indices = (data['OWNER_EMAIL'] == [email protected])
data = data[min_indices]
data.to_csv('isabevdata.csv')

Error:

KeyError: 'OWNER_EMAIL'


I need help with this code using pandas. I want to remove some columns later on from the result: isabevdata.csv --> using petl module and then send the table to front end for display

CZoellner
  • 13,553
  • 3
  • 25
  • 38

0 Answers0