0

I have a spreadsheet with about 3k rows I am trying to select data from (row specific) to enter in data for a form.

Currently my code is repeating the test for all rows in the CSV how can I select data from a random row?

Thanks!

1
  • most likely you need to implement your own custom data reader: github.com/Snooz82/… Commented Oct 3, 2022 at 13:18

1 Answer 1

-1

You can easily create your own library in python for reading and writing csv files. Here is a quick example which works with every text style file.

class costomLibrary(object):
    def read_specific_line(self, filename, row):
        '''
        This creates a keyword named "Read Specific Line"
        This keyword takes the filename of the file to read and the row 
        wich is to be read.
        '''
        fp = open(filename)
        for i, line in enumerate(fp):
            if i == row:
                return line
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.