Advertisement
g96

Untitled

g96
Feb 18th, 2022
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.81 KB | None | 0 0
  1. df=pd.read_csv(os.path.join(directory,'1.csv'))
  2.  
  3.  
  4.  
  5. cols =['Order Qty (SL)','Confirmed Qty (SL)','Unconfirmed Qty (SL)','Cancelled Qty (SL)','Open Qty (SL)','Reserved Qty (SL)',
  6.  
  7.     'Fixed Qty (SL)','% Allocation (SL)','Delivered Qty (SL)','PGI Qty (SL)','Invoiced Qty (SL)',
  8.     'Net Unit Price','Confirmed Net Value (SL)','Dollars Shipped (SL)','% Shipped/Allocated (SL)']
  9.  
  10. df.iloc[:-1, [df.columns.get_loc(c) for c in cols]].replace(',', '', regex=True).apply(pd.to_numeric)
  11.  
  12.  
  13. df[['Order Qty (SL)','Confirmed Qty (SL)','Unconfirmed Qty (SL)','Cancelled Qty (SL)','Open Qty (SL)','Reserved Qty (SL)',
  14.  
  15.     'Fixed Qty (SL)','% Allocation (SL)','Delivered Qty (SL)','PGI Qty (SL)','Invoiced Qty (SL)',
  16.     'Net Unit Price','Confirmed Net Value (SL)','Dollars Shipped (SL)','% Shipped/Allocated (SL)']] /= 1000
  17.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement