Selecting and deleting random csv lines in python [closed]

1

I need to make a small python script that meets the following requirements:

  • Open a csv file;
  • Exclude from reading the first line and the first column, because it contains information that will not be necessary in this computation itself;
  • Select a random number x of "rows" or "cells" of the file, where x is a value expressed as a percentage of the total number of rows in the file that will be defined by the user;
  • Delete the values of the selected rows or replace them with a value that can be excluded from a subsequent calculation, such as the character "x", "-", etc.

Any suggestions?

    
asked by anonymous 24.07.2016 / 04:55

0 answers