Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- df_1.to_csv(directory + '1.csv', index=False, header= True)
- df=pd.read_csv(os.path.join(directory,'1.csv'))
- df[['Order Qty (SL)','Confirmed Qty (SL)','Unconfirmed Qty (SL)','Cancelled Qty (SL)','Open Qty (SL)','Reserved Qty (SL)',
- 'Fixed Qty (SL)','% Allocation (SL)','Delivered Qty (SL)','PGI Qty (SL)','Invoiced Qty (SL)',
- 'Net Unit Price','Confirmed Net Value (SL)','Dollars Shipped (SL)','% Shipped/Allocated (SL)']] =[['Order Qty (SL)','Confirmed Qty (SL)','Unconfirmed Qty (SL)',
- 'Cancelled Qty (SL)','Open Qty (SL)','Reserved Qty (SL)',
- 'Fixed Qty (SL)','% Allocation (SL)','Delivered Qty (SL)','PGI Qty (SL)','Invoiced Qty (SL)',
- 'Net Unit Price','Confirmed Net Value (SL)','Dollars Shipped (SL)','% Shipped/Allocated (SL)']].apply(pd.to_numeric,axis=1)
- df[['Order Qty (SL)','Confirmed Qty (SL)','Unconfirmed Qty (SL)','Cancelled Qty (SL)','Open Qty (SL)','Reserved Qty (SL)',
- 'Fixed Qty (SL)','% Allocation (SL)','Delivered Qty (SL)','PGI Qty (SL)','Invoiced Qty (SL)',
- 'Net Unit Price','Confirmed Net Value (SL)','Dollars Shipped (SL)','% Shipped/Allocated (SL)']] /= 1000
- print(df.head())
- traceback:
- sys:1: DtypeWarning: Columns (32) have mixed types.Specify dtype option on import or set low_memory=False.
- Traceback (most recent call last):
- File "C:\Users\Digital Wholesale - Documents\2. Amazon\Customer Operations_OTC\02. Amazon weekly Report\Amazon weekly automation (Giorgi)\VL.py", line 29, in <module>
- 'Net Unit Price','Confirmed Net Value (SL)','Dollars Shipped (SL)','% Shipped/Allocated (SL)']] =[['Order Qty (SL)','Confirmed Qty (SL)','Unconfirmed Qty (SL)',
- AttributeError: 'list' object has no attribute 'apply'
- Process finished with exit code 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement