Regression: read_csv call with skiprows fails on pandas versions 0.15.2, 0.16.0, works on 0.15.0 and 0.15.1 · Issue #9832 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
# passes for 0.15.0
# passes for 0.15.1
# fails for 0.15.2
# fails for 0.16.0
# This is for a "csv" file where there are a number of initial rows to be skipped at file start.
import pandas as pd
import urllib
test_data_url = 'http://www.bom.gov.au/fwo/IDV60901/IDV60901.95936.axf'
test_file = 'test.csv'
ROWS_TO_SKIP_AT_THE_START = 19
def main():
urllib.urlretrieve(test_data_url, test_file)
print('pandas version: {}'.format(pd.version.version))
data = pd.read_csv(test_file, skiprows=ROWS_TO_SKIP_AT_THE_START)
assert len(data) == 145
assert 'sort_order' in data
print('file successfully read by read_csv()')
if __name__ == '__main__':
main()