A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/9832 below:

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 · GitHub

# 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()

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4