AgTalk Home
AgTalk Home
Search Forums | Classifieds | Skins | Language
You are logged in as a guest. ( logon | register )

Trim a column in a spreadsheet?
View previous thread :: View next thread
   Forums List -> Computer TalkMessage format
 
dko_scOH
Posted 12/11/2019 19:24 (#7901430 - in reply to #7900235)
Subject: RE: Trim a column in a spreadsheet?



39.48, -82.98

No Python on this machine to confirm, but I think this might work:

  bank_string = "BUSINESS xxxxx MERCHANT PURCHASE TERMINAL xxxxxxxx CITY NAME HERE DEBIT CARD PURCHASE 11-01-19 12:00 AM XXXXXXXXXXXXXXXX"
  split_string = bank_stream.split()
  s = " "
  a = bank_stream [0]
  b = bank_stream [1]
  c = bank_stream [2]
  str = s.join('a','b','c')
  print(str)

  BUSINESS xxxxx MERCHANT

There are more compact ways of doing this, especially if you load pandas, but you can see the steps this way. Don Smith will be along shortly to suggest a better approach.  :-)

Top of the page Bottom of the page


Jump to forum :
Search this forum
Printer friendly version
E-mail a link to this thread

(Delete cookies)