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