@@ -179,9 +179,6 @@ class DuplicateWarning(Warning):
179
179
180
180
# storer class map
181
181
_STORER_MAP = {
182
- "Series" : "LegacySeriesFixed" ,
183
- "DataFrame" : "LegacyFrameFixed" ,
184
- "DataMatrix" : "LegacyFrameFixed" ,
185
182
"series" : "SeriesFixed" ,
186
183
"frame" : "FrameFixed" ,
187
184
}
@@ -3083,35 +3080,6 @@ def write_array(self, key: str, value, items=None):
3083
3080
getattr (self .group , key )._v_attrs .transposed = transposed
3084
3081
3085
3082
3086
- class LegacyFixed (GenericFixed ):
3087
- def read_index_legacy (
3088
- self , key : str , start : Optional [int ] = None , stop : Optional [int ] = None
3089
- ):
3090
- node = getattr (self .group , key )
3091
- data = node [start :stop ]
3092
- kind = node ._v_attrs .kind
3093
- return _unconvert_index_legacy (
3094
- data , kind , encoding = self .encoding , errors = self .errors
3095
- )
3096
-
3097
-
3098
- class LegacySeriesFixed (LegacyFixed ):
3099
- def read (self , ** kwargs ):
3100
- kwargs = self .validate_read (kwargs )
3101
- index = self .read_index_legacy ("index" )
3102
- values = self .read_array ("values" )
3103
- return Series (values , index = index )
3104
-
3105
-
3106
- class LegacyFrameFixed (LegacyFixed ):
3107
- def read (self , ** kwargs ):
3108
- kwargs = self .validate_read (kwargs )
3109
- index = self .read_index_legacy ("index" )
3110
- columns = self .read_index_legacy ("columns" )
3111
- values = self .read_array ("values" )
3112
- return DataFrame (values , index = index , columns = columns )
3113
-
3114
-
3115
3083
class SeriesFixed (GenericFixed ):
3116
3084
pandas_kind = "series"
3117
3085
attributes = ["name" ]
@@ -4139,35 +4107,7 @@ def write(self, **kwargs):
4139
4107
raise NotImplementedError ("WORKTable needs to implement write" )
4140
4108
4141
4109
4142
- class LegacyTable (Table ):
4143
- """ an appendable table: allow append/query/delete operations to a
4144
- (possibly) already existing appendable table this table ALLOWS
4145
- append (but doesn't require them), and stores the data in a format
4146
- that can be easily searched
4147
-
4148
- """
4149
-
4150
- _indexables : Optional [List [IndexCol ]] = [
4151
- IndexCol (name = "index" , axis = 1 , pos = 0 ),
4152
- IndexCol (name = "column" , axis = 2 , pos = 1 , index_kind = "columns_kind" ),
4153
- DataCol (name = "fields" , cname = "values" , kind_attr = "fields" , pos = 2 ),
4154
- ]
4155
- table_type = "legacy"
4156
- ndim = 3
4157
-
4158
- def write (self , ** kwargs ):
4159
- raise TypeError ("write operations are not allowed on legacy tables!" )
4160
-
4161
- def read (self , where = None , columns = None , ** kwargs ):
4162
- """we have n indexable columns, with an arbitrary number of data
4163
- axes
4164
- """
4165
-
4166
- if not self .read_axes (where = where , ** kwargs ):
4167
- return None
4168
-
4169
-
4170
- class AppendableTable (LegacyTable ):
4110
+ class AppendableTable (Table ):
4171
4111
""" support the new appendable table formats """
4172
4112
4173
4113
_indexables = None
@@ -4866,21 +4806,6 @@ def _unconvert_index(data, kind, encoding=None, errors="strict"):
4866
4806
return index
4867
4807
4868
4808
4869
- def _unconvert_index_legacy (data , kind , legacy = False , encoding = None , errors = "strict" ):
4870
- kind = _ensure_decoded (kind )
4871
- if kind == "datetime" :
4872
- index = to_datetime (data )
4873
- elif kind in ("integer" ):
4874
- index = np .asarray (data , dtype = object )
4875
- elif kind in ("string" ):
4876
- index = _unconvert_string_array (
4877
- data , nan_rep = None , encoding = encoding , errors = errors
4878
- )
4879
- else : # pragma: no cover
4880
- raise ValueError ("unrecognized index type {kind}" .format (kind = kind ))
4881
- return index
4882
-
4883
-
4884
4809
def _convert_string_array (data , encoding , errors , itemsize = None ):
4885
4810
"""
4886
4811
we take a string-like that is object dtype and coerce to a fixed size
0 commit comments