I have a huge CSV file with 10000 rows and 500 columns. I want to extract the data from header to the row which contains device_boot
. I want to eliminate all rows after device_boot
.
Example:
Name,Time,status,..
start,05:06:2018 10:10:23,good,..
start,05:06:2018 10:11:23,good,..
failure,05:06:2018 11:10:25,critical,..
device_boot,05:06:2018 13:11:25,reboot,..
start,05:06:2018 13:13:23,good,..
start,05:06:2018 13:16:23,good,..
So, I need to maintain in CSV file up to device_boot
line (row) using pandas. I am able to remove the specific row on that keyword, but not able to extract up to that portion using pd.drop(...)
.
Thanks for the suggestions.