python - Pandas - Skip final X rows during read -


sometimes databases come proprietary markings @ end (ie last 5 rows copywrite notices), , these need ignored or mess dataset. using skiprows in combination nrows hardcode line numbers not viable because different database files have variable lengths. there way have pandas skip last x lines file when using various read functions?

clarification: common notification find @ bottom of data file in experience of form

name copyright (c) _____ rights reserved. confidentiality notice owner owner company 

where of these text in first column stuck after 1 or more blank lines after end of data (the blanks can dealt using df.dropna(how='all' inplace=true)).

note: python minus notation, ie skiprows=-7 not work, , open ended hardcoding ie skiprows=[195:] not work either (since interpreter not know how longer file until has been read).


Comments