I have a python script that restructures our organization's data into a different shape using python's pylightxl. But this script only works with excel files with less than 5000 rows of data, which is the standard format. But some files go up to 65000 rows, with unnecessary data after the 5000 index.
What i want is to delete the excess rows after 5000th index. Pylightxl cannot do this. Only pandas can, I've scoured the internet on deleting rows using pandas but the answers I've found so far havenot benefitted me.
The question is how can i delete excess rows using python pandas (the limit of which we may not know, it can go up to 200000), but the cut-off index is 5000 rows.
If you know another python way other than pandas, do answer as well.
Instead of deleting it, you could just get the first 5000 rows and use that