PasunuriSrinidhi commented on PR #4532:
URL: https://github.com/apache/doris/pull/4532#issuecomment-1509751396

   import csv
   
   with open('input_file.csv') as f:
       reader = csv.reader(f, delimiter='|')
       for row in reader:
           # Handle case where first column has extra character
           if row[0][0] != '1':
               row[0] = row[0][1:]
           # Handle case where last column has extra character
           if row[-1][-1] != '3':
               row[-1] = row[-1][:-1]
           # Process the row as usual
           # ...
   
   
   In this example, I have used the csv module to read the input data and split 
it into columns using the | delimiter. Then I will check the first and last 
columns of each row for extra characters and remove them if necessary.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to