There is a DataFrame, for example with the following content:
The task is to split the DataFrame into files, in which there will be a specified number of lines (set in a variable) and a file residue, if there is no multiple content left. Also, each file must be numbered with a save sequence number.
In life, the file has about 10 000 - 50 000 lines. Perhaps this is important. If there are variations on optimization, I will be glad to see them (for example, this df will contain more than 10,000,000 lines and it will be necessary to hit files differently in order to optimize resources.
According to the DataFame from the example (in df 5 lines) the following files should turn out:
- sample_1_2.csv
- sample_2_2.csv
- sample_3_1.csv
