File: sas.py

package info (click to toggle)
pandas 2.2.3%2Bdfsg-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 66,784 kB
  • sloc: python: 422,228; ansic: 9,190; sh: 270; xml: 102; makefile: 83
file content (23 lines) | stat: -rw-r--r-- 623 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from pathlib import Path

from pandas import read_sas

ROOT = Path(__file__).parents[3] / "pandas" / "tests" / "io" / "sas" / "data"


class SAS:
    def time_read_sas7bdat(self):
        read_sas(ROOT / "test1.sas7bdat")

    def time_read_xpt(self):
        read_sas(ROOT / "paxraw_d_short.xpt")

    def time_read_sas7bdat_2(self):
        next(read_sas(ROOT / "0x00controlbyte.sas7bdat.bz2", chunksize=11000))

    def time_read_sas7bdat_2_chunked(self):
        for i, _ in enumerate(
            read_sas(ROOT / "0x00controlbyte.sas7bdat.bz2", chunksize=1000)
        ):
            if i == 10:
                break