Skip to content

Commit 7cd9b82

Browse files
committed
Speed up SAS7BDAT parser
1 parent a62897a commit 7cd9b82

File tree

4 files changed

+802
-538
lines changed

4 files changed

+802
-538
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ repos:
4343
# from Cython files nor do we want to lint C files that we didn't modify for
4444
# this particular codebase (e.g. src/headers, src/klib). However,
4545
# we can lint all header files since they aren't "generated" like C files are.
46-
exclude: ^pandas/_libs/src/(klib|headers)/
46+
exclude: ^pandas/((_libs/src/(klib|headers)/)|(io/sas/portable_endian.h$))
4747
args: [--quiet, '--extensions=c,h', '--headers=h', --recursive, '--filter=-readability/casting,-runtime/int,-build/include_subdir']
4848
- repo: https://github.com/PyCQA/flake8
4949
rev: 4.0.1

asv_bench/benchmarks/io/excel.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
from io import BytesIO
22

33
import numpy as np
4-
from odf.opendocument import OpenDocumentSpreadsheet
5-
from odf.table import (
6-
Table,
7-
TableCell,
8-
TableRow,
9-
)
10-
from odf.text import P
4+
5+
try:
6+
from odf.opendocument import OpenDocumentSpreadsheet
7+
from odf.table import (
8+
Table,
9+
TableCell,
10+
TableRow,
11+
)
12+
from odf.text import P
13+
14+
have_odf = True
15+
except ModuleNotFoundError:
16+
have_odf = False
1117

1218
from pandas import (
1319
DataFrame,

0 commit comments

Comments
 (0)