MCPcopy
hub / github.com/pandas-dev/pandas / put

Method put

pandas/io/pytables.py:1131–1233  ·  view source on GitHub ↗

Store object in HDFStore. This method writes a pandas DataFrame or Series into an HDF5 file using either the fixed or table format. The `table` format allows additional operations like incremental appends and queries but may have performance trade-offs. The

(
        self,
        key: str,
        value: DataFrame | Series,
        format=None,
        index: bool = True,
        append: bool = False,
        complib=None,
        complevel: int | None = None,
        min_itemsize: int | dict[str, int] | None = None,
        nan_rep=None,
        data_columns: Literal[True] | list[str] | None = None,
        encoding=None,
        errors: str = "strict",
        track_times: bool = True,
        dropna: bool = False,
    )

Source from the content-addressed store, hash-verified

1129 return it.get_result(coordinates=True)
1130
1131 def put(
1132 self,
1133 key: str,
1134 value: DataFrame | Series,
1135 format=None,
1136 index: bool = True,
1137 append: bool = False,
1138 complib=None,
1139 complevel: int | None = None,
1140 min_itemsize: int | dict[str, int] | None = None,
1141 nan_rep=None,
1142 data_columns: Literal[True] | list[str] | None = None,
1143 encoding=None,
1144 errors: str = "strict",
1145 track_times: bool = True,
1146 dropna: bool = False,
1147 ) -> None:
1148 """
1149 Store object in HDFStore.
1150
1151 This method writes a pandas DataFrame or Series into an HDF5 file using
1152 either the fixed or table format. The `table` format allows additional
1153 operations like incremental appends and queries but may have performance
1154 trade-offs. The `fixed` format provides faster read/write operations but
1155 does not support appends or queries.
1156
1157 Parameters
1158 ----------
1159 key : str
1160 Key of object to store in file.
1161 value : {Series, DataFrame}
1162 Value of object to store in file.
1163 format : 'fixed(f)|table(t)', default is 'fixed'
1164 Format to use when storing object in HDFStore. Value can be one of:
1165
1166 ``'fixed'``
1167 Fixed format. Fast writing/reading. Not-appendable, nor searchable.
1168 ``'table'``
1169 Table format. Write as a PyTables Table structure which may perform
1170 worse but allow more flexible operations like searching / selecting
1171 subsets of the data.
1172 index : bool, default True
1173 Write DataFrame index as a column.
1174 append : bool, default False
1175 This will force Table format, append the input data to the existing.
1176 complib : default None
1177 This parameter is currently not accepted.
1178 complevel : int, 0-9, default None
1179 Specifies a compression level for data.
1180 A value of 0 or None disables compression.
1181 min_itemsize : int, dict, or None
1182 Dict of columns that specify minimum str sizes.
1183 nan_rep : str
1184 Str to use as str nan representation.
1185 data_columns : list of columns or True, default None
1186 List of columns to create as data columns, or True to use all columns.
1187 See `here
1188 <https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#query-via-data-columns>`__.

Callers 15

__setitem__Method · 0.95
copyMethod · 0.95
test_multiple_open_closeFunction · 0.95
setupMethod · 0.80
time_write_storeMethod · 0.80
safe_sortFunction · 0.80
_reorder_by_uniquesFunction · 0.80
_make_selectorsMethod · 0.80
to_hdfFunction · 0.80
write_metadataMethod · 0.80

Calls 3

_validate_formatMethod · 0.95
_write_to_groupMethod · 0.95
get_optionFunction · 0.90