We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b8c221 commit 4c1738dCopy full SHA for 4c1738d
hdxms_datasets/reader.py
@@ -127,9 +127,13 @@ def read_hdexaminer_peptide_pool(source: Path | StringIO) -> nw.DataFrame:
127
header_line = source.readline()
128
129
else:
130
- df = nw.read_csv(
131
- source.as_posix(), backend=BACKEND, skip_rows=1, has_header=True
132
- )
+ kwargs = {
+ "polars": {"skip_rows": 1, "has_header": True},
+ "pandas": {"skiprows": [0]},
133
+ }
134
+ if BACKEND not in kwargs:
135
+ raise ValueError(f"Unsupported backend: {BACKEND}")
136
+ df = nw.read_csv(source.as_posix(), backend=BACKEND, **kwargs[BACKEND])
137
with open(source, "r") as fh:
138
exposure_line = fh.readline()
139
header_line = fh.readline()
0 commit comments