@@ -569,9 +569,10 @@ def __getattr__(self, name: str):
569
569
)
570
570
571
571
def __contains__ (self , key : str ) -> bool :
572
- """ check for existence of this key
573
- can match the exact pathname or the pathnm w/o the leading '/'
574
- """
572
+ """
573
+ check for existence of this key
574
+ can match the exact pathname or the pathnm w/o the leading '/'
575
+ """
575
576
node = self .get_node (key )
576
577
if node is not None :
577
578
name = node ._v_pathname
@@ -1831,18 +1832,19 @@ def get_result(self, coordinates: bool = False):
1831
1832
1832
1833
1833
1834
class IndexCol :
1834
- """ an index column description class
1835
+ """
1836
+ an index column description class
1835
1837
1836
- Parameters
1837
- ----------
1838
+ Parameters
1839
+ ----------
1838
1840
1839
- axis : axis which I reference
1840
- values : the ndarray like converted values
1841
- kind : a string description of this type
1842
- typ : the pytables type
1843
- pos : the position in the pytables
1841
+ axis : axis which I reference
1842
+ values : the ndarray like converted values
1843
+ kind : a string description of this type
1844
+ typ : the pytables type
1845
+ pos : the position in the pytables
1844
1846
1845
- """
1847
+ """
1846
1848
1847
1849
is_an_indexable = True
1848
1850
is_data_indexable = True
@@ -1999,9 +2001,11 @@ def __iter__(self):
1999
2001
return iter (self .values )
2000
2002
2001
2003
def maybe_set_size (self , min_itemsize = None ):
2002
- """ maybe set a string col itemsize:
2003
- min_itemsize can be an integer or a dict with this columns name
2004
- with an integer size """
2004
+ """
2005
+ maybe set a string col itemsize:
2006
+ min_itemsize can be an integer or a dict with this columns name
2007
+ with an integer size
2008
+ """
2005
2009
if _ensure_decoded (self .kind ) == "string" :
2006
2010
2007
2011
if isinstance (min_itemsize , dict ):
@@ -2051,8 +2055,10 @@ def validate_attr(self, append: bool):
2051
2055
)
2052
2056
2053
2057
def update_info (self , info ):
2054
- """ set/update the info for this indexable with the key/value
2055
- if there is a conflict raise/warn as needed """
2058
+ """
2059
+ set/update the info for this indexable with the key/value
2060
+ if there is a conflict raise/warn as needed
2061
+ """
2056
2062
2057
2063
for key in self ._info_fields :
2058
2064
@@ -2140,17 +2146,18 @@ def set_attr(self):
2140
2146
2141
2147
2142
2148
class DataCol (IndexCol ):
2143
- """ a data holding column, by definition this is not indexable
2149
+ """
2150
+ a data holding column, by definition this is not indexable
2144
2151
2145
- Parameters
2146
- ----------
2152
+ Parameters
2153
+ ----------
2147
2154
2148
- data : the actual data
2149
- cname : the column name in the table to hold the data (typically
2150
- values)
2151
- meta : a string description of the metadata
2152
- metadata : the actual metadata
2153
- """
2155
+ data : the actual data
2156
+ cname : the column name in the table to hold the data (typically
2157
+ values)
2158
+ meta : a string description of the metadata
2159
+ metadata : the actual metadata
2160
+ """
2154
2161
2155
2162
is_an_indexable = False
2156
2163
is_data_indexable = False
@@ -2460,16 +2467,17 @@ class GenericDataIndexableCol(DataIndexableCol):
2460
2467
2461
2468
2462
2469
class Fixed :
2463
- """ represent an object in my store
2464
- facilitate read/write of various types of objects
2465
- this is an abstract base class
2470
+ """
2471
+ represent an object in my store
2472
+ facilitate read/write of various types of objects
2473
+ this is an abstract base class
2466
2474
2467
- Parameters
2468
- ----------
2469
- parent : HDFStore
2470
- group : Node
2471
- The group node where the table resides.
2472
- """
2475
+ Parameters
2476
+ ----------
2477
+ parent : HDFStore
2478
+ group : Node
2479
+ The group node where the table resides.
2480
+ """
2473
2481
2474
2482
pandas_kind : str
2475
2483
format_type : str = "fixed" # GH#30962 needed by dask
@@ -2596,8 +2604,10 @@ def validate_version(self, where=None):
2596
2604
return True
2597
2605
2598
2606
def infer_axes (self ):
2599
- """ infer the axes of my storer
2600
- return a boolean indicating if we have a valid storer or not """
2607
+ """
2608
+ infer the axes of my storer
2609
+ return a boolean indicating if we have a valid storer or not
2610
+ """
2601
2611
2602
2612
s = self .storable
2603
2613
if s is None :
@@ -3105,29 +3115,29 @@ class FrameFixed(BlockManagerFixed):
3105
3115
3106
3116
3107
3117
class Table (Fixed ):
3108
- """ represent a table:
3109
- facilitate read/write of various types of tables
3110
-
3111
- Attrs in Table Node
3112
- -------------------
3113
- These are attributes that are store in the main table node, they are
3114
- necessary to recreate these tables when read back in.
3115
-
3116
- index_axes : a list of tuples of the (original indexing axis and
3117
- index column)
3118
- non_index_axes: a list of tuples of the (original index axis and
3119
- columns on a non-indexing axis)
3120
- values_axes : a list of the columns which comprise the data of this
3121
- table
3122
- data_columns : a list of the columns that we are allowing indexing
3123
- (these become single columns in values_axes), or True to force all
3124
- columns
3125
- nan_rep : the string to use for nan representations for string
3126
- objects
3127
- levels : the names of levels
3128
- metadata : the names of the metadata columns
3129
-
3130
- """
3118
+ """
3119
+ represent a table:
3120
+ facilitate read/write of various types of tables
3121
+
3122
+ Attrs in Table Node
3123
+ -------------------
3124
+ These are attributes that are store in the main table node, they are
3125
+ necessary to recreate these tables when read back in.
3126
+
3127
+ index_axes : a list of tuples of the (original indexing axis and
3128
+ index column)
3129
+ non_index_axes: a list of tuples of the (original index axis and
3130
+ columns on a non-indexing axis)
3131
+ values_axes : a list of the columns which comprise the data of this
3132
+ table
3133
+ data_columns : a list of the columns that we are allowing indexing
3134
+ (these become single columns in values_axes), or True to force all
3135
+ columns
3136
+ nan_rep : the string to use for nan representations for string
3137
+ objects
3138
+ levels : the names of levels
3139
+ metadata : the names of the metadata columns
3140
+ """
3131
3141
3132
3142
pandas_kind = "wide_table"
3133
3143
format_type : str = "table" # GH#30962 needed by dask
@@ -4080,10 +4090,11 @@ def read_column(
4080
4090
4081
4091
4082
4092
class WORMTable (Table ):
4083
- """ a write-once read-many table: this format DOES NOT ALLOW appending to a
4084
- table. writing is a one-time operation the data are stored in a format
4085
- that allows for searching the data on disk
4086
- """
4093
+ """
4094
+ a write-once read-many table: this format DOES NOT ALLOW appending to a
4095
+ table. writing is a one-time operation the data are stored in a format
4096
+ that allows for searching the data on disk
4097
+ """
4087
4098
4088
4099
table_type = "worm"
4089
4100
@@ -4094,14 +4105,16 @@ def read(
4094
4105
start : Optional [int ] = None ,
4095
4106
stop : Optional [int ] = None ,
4096
4107
):
4097
- """ read the indices and the indexing array, calculate offset rows and
4098
- return """
4108
+ """
4109
+ read the indices and the indexing array, calculate offset rows and return
4110
+ """
4099
4111
raise NotImplementedError ("WORMTable needs to implement read" )
4100
4112
4101
4113
def write (self , ** kwargs ):
4102
- """ write in a format that we can search later on (but cannot append
4103
- to): write out the indices and the values using _write_array
4104
- (e.g. a CArray) create an indexing table so that we can search
4114
+ """
4115
+ write in a format that we can search later on (but cannot append
4116
+ to): write out the indices and the values using _write_array
4117
+ (e.g. a CArray) create an indexing table so that we can search
4105
4118
"""
4106
4119
raise NotImplementedError ("WORMTable needs to implement write" )
4107
4120
@@ -4170,8 +4183,9 @@ def write(
4170
4183
table .write_data (chunksize , dropna = dropna )
4171
4184
4172
4185
def write_data (self , chunksize : Optional [int ], dropna : bool = False ):
4173
- """ we form the data into a 2-d including indexes,values,mask
4174
- write chunk-by-chunk """
4186
+ """
4187
+ we form the data into a 2-d including indexes,values,mask write chunk-by-chunk
4188
+ """
4175
4189
4176
4190
names = self .dtype .names
4177
4191
nrows = self .nrows_expected
0 commit comments