Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.1 kB
2
Indexable
Never
import pandas as pd

#from Axis.Code.param_config import config

def load_data_from_file(engine): #pass engine if needed

    #path = config.data_path+config.data_file_name
    #df=pd.read_csv(path,encoding=config.encoding,delimiter=config.file_delimiter)
    #SQL= """SELECT tenant_id, event_id, event_num, versn, event_type, event_status,
       ##event_desc, event_owner_id, event_owner_name, category_id, category_name,
       #currency_code, region_code, supplier_id, supplier_name, award_value,
       #org_id, org_name, created_date, created_by, updated_date, updated_by,
       #flag
  #FROM ods_evntsrc_train where tenant_id = 720600 """
    
    df = pd.read_csv('/Analytics/venv/Jup/CAPE_ServicePlus_UC/New Method/new_data.csv')
    data = df[['ticket_category','ticket_type', 'ticket_item', 'ticket_summary', 'ticket_severity','ticket_resolution_date',
                  'response_sla_violated', 'resolution_sla_violated','created_date','reopen_count','role_id','person_who_resolved']]

    data.to_csv(encoding="utf-8",index=False)

    return data