Guest User

Untitled

a guest
Aug 21st, 2019
60
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pd.read_csv(
  2. "data.csv.gz",
  3. delimiter = "^",
  4. # line numbers to skip (i.e. headers in an excel report)
  5. skiprows = 2,
  6. # used to denote the start and end of a quoted item
  7. quotechar = "|",
  8. # return a subset of columns
  9. usecols = ["return_date", "company", "sales"],
  10. # data type for data or columns
  11. dtype = { "sales": np.float64 },
  12. # additional strings to recognize as NA/NaN
  13. na_values = [".", "?"],
  14. # convert to datetime, instead of object
  15. parse_dates = ["return_date"],
  16. # for on-the-fly decompression of on-disk data
  17. # options - gzip, bz2, zip, xz
  18. compression = "gzip",
  19. # encoding to use for reading
  20. encoding = "latin1",
  21. # read in a subset of data
  22. nrows = 100
  23. )
RAW Paste Data