@@ -1121,11 +1121,8 @@ def __init__(
1121
1121
1122
1122
# State variables for the file
1123
1123
self ._close_file : Callable [[], None ] | None = None
1124
- self ._missing_values = False
1125
- self ._can_read_value_labels = False
1126
1124
self ._column_selector_set = False
1127
1125
self ._value_labels_read = False
1128
- self ._data_read = False
1129
1126
self ._dtype : np .dtype | None = None
1130
1127
self ._lines_read = 0
1131
1128
@@ -1650,8 +1647,6 @@ def read(
1650
1647
# StopIteration. If reading the whole thing return an empty
1651
1648
# data frame.
1652
1649
if (self ._nobs == 0 ) and nrows == 0 :
1653
- self ._can_read_value_labels = True
1654
- self ._data_read = True
1655
1650
data = DataFrame (columns = self ._varlist )
1656
1651
# Apply dtypes correctly
1657
1652
for i , col in enumerate (data .columns ):
@@ -1664,7 +1659,6 @@ def read(
1664
1659
return data
1665
1660
1666
1661
if (self ._format_version >= 117 ) and (not self ._value_labels_read ):
1667
- self ._can_read_value_labels = True
1668
1662
self ._read_strls ()
1669
1663
1670
1664
# Read data
@@ -1687,9 +1681,7 @@ def read(
1687
1681
)
1688
1682
1689
1683
self ._lines_read += read_lines
1690
- if self ._lines_read == self ._nobs :
1691
- self ._can_read_value_labels = True
1692
- self ._data_read = True
1684
+
1693
1685
# if necessary, swap the byte order to native here
1694
1686
if self ._byteorder != self ._native_byteorder :
1695
1687
raw_data = raw_data .byteswap ().view (raw_data .dtype .newbyteorder ())
0 commit comments