@@ -148,7 +148,7 @@ class SAS7BDATReader(ReaderBase, abc.Iterator):
148
148
Return SAS7BDATReader object for iterations, returns chunks
149
149
with given number of lines.
150
150
encoding : str, 'infer', defaults to None
151
- String encoding acc. to python standard encodings,
151
+ String encoding acc. to Python standard encodings,
152
152
encoding='infer' tries to detect the encoding from the file header,
153
153
encoding=None will leave the data in binary format.
154
154
convert_text : bool, defaults to True
@@ -273,23 +273,6 @@ def _get_properties(self) -> None:
273
273
else :
274
274
self .inferred_encoding = f"unknown (code={ buf } )"
275
275
276
- # Get platform information
277
- buf = self ._read_bytes (const .platform_offset , const .platform_length )
278
- if buf == b"1" :
279
- self .platform = "unix"
280
- elif buf == b"2" :
281
- self .platform = "windows"
282
- else :
283
- self .platform = "unknown"
284
-
285
- self .name = self ._read_and_convert_header_text (
286
- const .dataset_offset , const .dataset_length
287
- )
288
-
289
- self .file_type = self ._read_and_convert_header_text (
290
- const .file_type_offset , const .file_type_length
291
- )
292
-
293
276
# Timestamp is epoch 01/01/1960
294
277
epoch = datetime (1960 , 1 , 1 )
295
278
x = self ._read_float (
@@ -316,29 +299,6 @@ def _get_properties(self) -> None:
316
299
self ._page_length = self ._read_int (
317
300
const .page_size_offset + align1 , const .page_size_length
318
301
)
319
- self ._page_count = self ._read_int (
320
- const .page_count_offset + align1 , const .page_count_length
321
- )
322
-
323
- self .sas_release_offset = self ._read_and_convert_header_text (
324
- const .sas_release_offset + total_align , const .sas_release_length
325
- )
326
-
327
- self .server_type = self ._read_and_convert_header_text (
328
- const .sas_server_type_offset + total_align , const .sas_server_type_length
329
- )
330
-
331
- self .os_version = self ._read_and_convert_header_text (
332
- const .os_version_number_offset + total_align , const .os_version_number_length
333
- )
334
-
335
- self .os_name = self ._read_and_convert_header_text (
336
- const .os_name_offset + total_align , const .os_name_length
337
- )
338
- if not self .os_name :
339
- self .os_name = self ._read_and_convert_header_text (
340
- const .os_maker_offset + total_align , const .os_maker_length
341
- )
342
302
343
303
def __next__ (self ) -> DataFrame :
344
304
da = self .read (nrows = self .chunksize or 1 )
0 commit comments