daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Jan 15th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pandas as pd
  2. import os, glob, csv
  3. import collections
  4. from os import listdir
  5. from os.path import isfile, join
  6.  
  7.  
  8. df = pd.read_csv("csv3.csv", sep=";", encoding = "ISO-8859-1")
  9. df2 = df.sort_values(['CHAMADO', 'id'])
  10.  
  11.  
  12. g1 = df2.sort_values(['DATA_ALT'], ascending=False)
  13.  
  14.  
  15. ret_group = g1.groupby(['CHAMADO'])
  16.  
  17. for key, group in ret_group:
  18.     if group['PRIORIDADE'].any() == True:
  19.         splitcontrato = group['VALOR_NEW'].any().split(" ")
  20.         if splitcontrato[0] == 'Contrato':
  21.             print('\t')
  22.         else:
  23.             print(group)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top